aboutsummaryrefslogtreecommitdiff
path: root/help.html
blob: faf7af6123e8ea7c10e0d107fab35e1bf36ed7b6 (plain)
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
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="theme-color" content="#0a0a14">
<title>WebX11 — Help</title>
<script>!function(){var v=localStorage.getItem('webx11_cache_ver');if(!v)return;var m=v.match(/v([\d.]+)/);if(!m)return;var ver='v'+m[1];document.title='WebX11 '+ver+' \u2014 Help';var els=document.querySelectorAll('.badge-v');for(var i=0;i<els.length;i++)els[i].textContent=ver;var qr=document.querySelector('.quick-ref-title');if(qr)qr.textContent='WebX11 '+ver;var ov=document.querySelector('#overview p');if(ov)ov.textContent=ov.textContent.replace(/v[\d.]+/,ver)}()</script>
<style>
/* ── Reset & Base ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
:root{
  --bg:#0a0a14;
  --bg2:#141428;
  --bg3:#1c1c36;
  --bg4:#24244a;
  --text:#e8e8ff;
  --text2:#b0b0cc;
  --accent:#818cf8;
  --accent2:#a78bfa;
  --green:#34d399;
  --cyan:#22d3ee;
  --amber:#fbbf24;
  --rose:#fb7185;
  --pink:#e879f9;
  --border:#3a3a5a;
  --radius:12px;
  --font-mono:'JetBrains Mono','Fira Code','Cascadia Code','Courier New',monospace;
  --font-sans:-apple-system,BlinkMacSystemFont,'Segoe UI','Inter','SF Pro',Roboto,sans-serif
}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:var(--font-sans);line-height:1.8;font-size:17px;-webkit-font-smoothing:antialiased}
@media(max-width:600px){body{font-size:15px}}

/* ── Header ── */
header{
  position:sticky;top:0;z-index:100;
  background:rgba(10,10,20,.85);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--border);padding:0
}
header::after{
  content:'';position:absolute;bottom:-1px;left:10%;right:10%;height:1px;
  background:linear-gradient(90deg,transparent,var(--accent),transparent);opacity:.5
}
.header-inner{max-width:960px;margin:0 auto;padding:20px 24px 16px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.header-left{display:flex;align-items:center;gap:14px}
.header-logo{width:36px;height:36px;border-radius:8px;background:linear-gradient(135deg,var(--accent),var(--pink));display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff;flex-shrink:0}
h1{font-size:1.35em;font-weight:700;letter-spacing:-.02em;color:#fff}
h1 span{color:var(--accent2)}
.header-meta{display:flex;align-items:center;gap:10px;font-size:.8em;color:var(--text2)}
.badge{
  display:inline-block;padding:3px 10px;border-radius:20px;font-size:.7em;font-weight:600;
  letter-spacing:.03em;text-transform:uppercase
}
.badge-v{background:rgba(124,92,252,.2);color:var(--accent2);border:1px solid rgba(124,92,252,.3)}
.badge-new{background:rgba(52,211,153,.15);color:var(--green);border:1px solid rgba(52,211,153,.25)}

/* ── Nav ── */
nav{
  position:sticky;top:74px;z-index:99;
  background:rgba(10,10,20,.7);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);padding:0;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none
}
nav::-webkit-scrollbar{display:none}
.nav-inner{max-width:960px;margin:0 auto;padding:8px 24px;display:flex;gap:4px;flex-wrap:nowrap}
.nav-link{
  flex-shrink:0;color:var(--text2);text-decoration:none;padding:6px 14px;border-radius:8px;
  font-size:.78em;font-weight:500;transition:all .15s;white-space:nowrap
}
.nav-link:hover{color:#fff;background:rgba(124,92,252,.12)}

/* ── Main ── */
main{max-width:960px;margin:0 auto;padding:32px 24px 80px}

/* ── Search ── */
.search-box{
  display:flex;gap:8px;margin-bottom:40px;
  background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);
  padding:4px;transition:border-color .2s
}
.search-box:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(124,92,252,.15)}
.search-box input{
  flex:1;background:transparent;border:none;color:var(--text);font-family:var(--font-mono);
  font-size:.9em;outline:none;padding:10px 14px
}
.search-box input::placeholder{color:var(--text2);opacity:.6}
.search-box button{
  background:var(--accent);color:#fff;border:none;padding:8px 20px;border-radius:8px;
  font-size:.8em;font-weight:600;cursor:pointer;transition:opacity .15s;font-family:inherit
}
.search-box button:hover{opacity:.85}
.search-result-msg{color:var(--amber);font-size:.85em;margin-top:8px;display:none}

/* ── Sections ── */
section{margin-bottom:56px;scroll-margin-top:130px}
h2{
  font-size:1.35em;font-weight:700;color:#fff;margin-bottom:20px;letter-spacing:-.01em;
  display:flex;align-items:center;gap:10px
}
h2::after{content:'';flex:1;height:1px;background:linear-gradient(90deg,var(--border),transparent)}
h3{
  font-size:1.05em;font-weight:600;color:var(--text);margin:28px 0 12px;
  display:flex;align-items:center;gap:8px
}
h4{font-size:.92em;font-weight:600;color:var(--accent2);margin:20px 0 8px}
p{margin-bottom:14px;color:var(--text);line-height:1.8}
ul,ol{margin-bottom:14px;padding-left:22px;color:var(--text)}
li{margin-bottom:6px}
a{color:var(--accent2);text-decoration:none;transition:color .15s}
a:hover{color:#fff}

/* ── Tables ── */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:16px 0;border-radius:var(--radius);border:1px solid var(--border)}
table{width:100%;border-collapse:collapse;font-size:.88em}
th,td{padding:10px 14px;text-align:left;border-bottom:1px solid var(--border)}
th{background:var(--bg3);color:var(--accent2);font-weight:600;font-size:.82em;text-transform:uppercase;letter-spacing:.04em}
tr:last-child td{border-bottom:none}
tr:hover td{background:rgba(124,92,252,.04)}
code{
  font-family:var(--font-mono);font-size:.88em;padding:2px 7px;border-radius:5px;
  background:rgba(124,92,252,.12);color:var(--accent2);border:1px solid rgba(124,92,252,.15)
}
pre code{background:transparent;border:none;padding:0;color:var(--text);font-size:.88em}

/* ── Pre / Code Blocks ── */
pre{
  background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);
  padding:16px 20px;overflow-x:auto;margin:16px 0;font-family:var(--font-mono);font-size:.85em;line-height:1.6
}
pre .cmt{color:var(--text2);opacity:.6} /* comment style */

/* ── Callouts ── */
.callout{
  padding:16px 20px;border-radius:var(--radius);margin:16px 0;
  border-left:3px solid;position:relative
}
.callout::before{content:'';position:absolute;inset:0;border-radius:var(--radius);opacity:.06;pointer-events:none}
.callout-success{border-color:var(--green)}.callout-success::before{background:var(--green)}
.callout-info{border-color:var(--cyan)}.callout-info::before{background:var(--cyan)}
.callout-warning{border-color:var(--amber)}.callout-warning::before{background:var(--amber)}
.callout-error{border-color:var(--rose)}.callout-error::before{background:var(--rose)}
.callout-ollama{border-color:var(--pink)}.callout-ollama::before{background:var(--pink)}
.callout-title{font-weight:700;margin-bottom:6px;display:block;font-size:.92em}

/* ── Feature Grid ── */
.feature-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:16px 0}
.feature-card{
  background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);
  padding:16px;transition:border-color .2s,transform .15s
}
.feature-card:hover{border-color:rgba(124,92,252,.4);transform:translateY(-1px)}
.feature-card h4{margin:0 0 6px;font-size:.88em}
.feature-card p{font-size:.82em;color:var(--text2);margin:0;line-height:1.5}

/* ── Quick Ref ── */
.quick-ref{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin:16px 0}
.quick-ref-title{color:var(--accent2);font-weight:700;text-align:center;margin-bottom:16px;font-size:.95em;letter-spacing:.02em;text-transform:uppercase}
.quick-ref-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
.quick-ref-item{background:var(--bg3);padding:10px 12px;border-radius:8px;border:1px solid var(--border)}
.quick-ref-item .cmd{color:var(--accent2);font-family:var(--font-mono);font-weight:600;font-size:.85em;display:block}
.quick-ref-item .desc{color:var(--text2);font-size:.78em;margin-top:3px}

/* ── Version Items ── */
.version-item{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin:12px 0;transition:border-color .2s}
.version-item:hover{border-color:rgba(124,92,252,.3)}
.version-item .v-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;flex-wrap:wrap;gap:6px}
.version-item .v-num{color:var(--accent2);font-weight:700;font-size:.95em}
.version-item .v-date{color:var(--text2);font-size:.82em}
.version-item ul{margin:0;padding-left:18px}
.version-item li{margin-bottom:4px;font-size:.88em;color:var(--text)}

/* ── Footer ── */
footer{
  text-align:center;padding:32px 24px;border-top:1px solid var(--border);
  color:var(--text2);font-size:.82em
}
footer .links{display:flex;justify-content:center;gap:20px;margin-bottom:14px;flex-wrap:wrap}
footer .links a{color:var(--text);font-weight:500}
footer .links a:hover{color:var(--accent2)}
footer .tagline{color:var(--accent2);margin-top:10px;font-weight:500}

/* ── Back to Top ── */
.back-top{
  position:fixed;bottom:24px;right:24px;
  background:var(--bg3);border:1px solid var(--border);color:var(--text2);
  width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;
  font-size:18px;cursor:pointer;opacity:0;pointer-events:none;transition:all .2s;z-index:50;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);text-decoration:none
}
.back-top.visible{opacity:1;pointer-events:auto}
.back-top:hover{background:var(--accent);color:#fff;border-color:var(--accent);transform:translateY(-2px)}

/* ── Responsive ── */
@media(max-width:600px){
  .header-inner{padding:16px 16px 12px}
  .header-meta{display:none}
  .nav-inner{padding:6px 12px;gap:2px}
  .nav-link{padding:5px 10px;font-size:.74em}
  main{padding:20px 16px 60px}
  h2{font-size:1.15em}
  .feature-grid{grid-template-columns:1fr}
  .quick-ref-grid{grid-template-columns:1fr 1fr}
  pre{font-size:.8em;padding:12px 14px}
  th,td{padding:8px 10px;font-size:.82em}
}
@media(max-width:400px){
  .quick-ref-grid{grid-template-columns:1fr}
  .badge-new{display:none}
}

/* ── Doc Tabs ── */
.doc-tabs{display:flex;gap:0;margin-bottom:32px;border-bottom:1px solid var(--border);flex-wrap:wrap}
.doc-tabs input{display:none}
.doc-tabs label{
  flex-shrink:0;padding:12px 20px;cursor:pointer;font-size:.82em;font-weight:600;
  color:var(--text2);border-bottom:2px solid transparent;transition:all .15s;
  font-family:var(--font-sans);user-select:none;-webkit-user-select:none
}
.doc-tabs label:hover{color:var(--text)}
.doc-tabs input:checked+label{color:var(--accent2);border-color:var(--accent2)}
.doc-tab{display:none}
.doc-tab.active{display:block}

</style>
</head>
<body>

<header>
  <div class="header-inner">
    <div class="header-left">
      <div class="header-logo">⚡</div>
      <h1>WebX11 <span>Docs</span></h1>
    </div>
    <div class="header-meta">
      <span class="badge badge-v">v4.5.22</span>
      <span class="badge badge-new">38 core · ext</span>
      <span style="color:var(--text2)">160+ commands</span>
    </div>
  </div>
</header>

<nav>
  <div class="nav-inner">
    <a href="#overview" class="nav-link">Overview</a>
    <a href="#start" class="nav-link">Quick Start</a>
    <a href="#commands" class="nav-link">Commands</a>
    <a href="#guides" class="nav-link">Guides</a>
    <a href="#filesystem" class="nav-link">Filesystem</a>
    <a href="#ai" class="nav-link">AI Agent</a>
    <a href="skills.html" class="nav-link">Skills → dynamic</a>
    <a href="#ollama" class="nav-link">Ollama</a>
    <a href="#web" class="nav-link">Search & Web</a>
    <a href="#agents" class="nav-link">Agents</a>
    <a href="#a2a-contracts" class="nav-link">A2A</a>
    <a href="#neural-vfs" class="nav-link">Neural VFS</a>
    <a href="#server-monitor" class="nav-link">Monitor</a>
    <a href="#debug-panel" class="nav-link">Debug</a>
    <a href="#sandbox" class="nav-link">Sandbox</a>
    <a href="#memory-graph" class="nav-link">Memory</a>
    <a href="#world-model" class="nav-link">World Model</a>
    <a href="#security" class="nav-link">Security</a>
    <a href="#trouble" class="nav-link">Troubleshoot</a>
    <a href="#ref" class="nav-link">Quick Ref</a>
    <a href="#history" class="nav-link">Changelog</a>
  </div>
</nav>

<main>
<div class="doc-tabs">
  <input type="radio" name="doc-layer" id="tab-basics" checked>
  <label for="tab-basics">🌱 Start in 5 Min</label>
  <input type="radio" name="doc-layer" id="tab-guide">
  <label for="tab-guide">📘 User Guide</label>
  <input type="radio" name="doc-layer" id="tab-dev">
  <label for="tab-dev">🔧 Dev Reference</label>
</div>
<div class="doc-tab active" id="content-basics">
  <section id="basics-overview">
    <h2>🚀 Welcome to newOS4</h2>
    <div class="callout callout-success">
      <span class="callout-title">🎮 New here?</span>
      Type <code>tutorial</code> in the terminal to start a 2-minute interactive tour!
    </div>
    <div class="feature-grid">
      <div class="feature-card"><h4>🖥️ Terminal OS</h4><p>Full virtual filesystem with ls, cd, cat, touch, edit, find, grep and 50+ Unix-like commands.</p></div>
      <div class="feature-card"><h4>🤖 AI Assistant</h4><p>Built-in AI agent with tool calling, skills, memory, and 28 tools. Just type <code>ai "your question"</code>.</p></div>
      <div class="feature-card"><h4>🧩 Module System</h4><p>50 modules across 3 layers — <a href="modules.html">Browse on Modules page →</a> (dynamic, searchable, live status)</p></div>
      <div class="feature-card"><h4>📚 Skills</h4><p>Browse live on the <a href="skills.html">Skills page →</a> (searchable, filterable, no hardcoded lists).</p></div>
    </div>
  </section>

  <section id="basics-first">
    <h3>🔤 First 6 Commands</h3>
    <div class="quick-ref">
      <div class="quick-ref-grid">
        <div class="quick-ref-item"><span class="cmd">help</span><span class="desc">Show all commands</span></div>
        <div class="quick-ref-item"><span class="cmd">ls</span><span class="desc">List files</span></div>
        <div class="quick-ref-item"><span class="cmd">cat</span><span class="desc">View file content</span></div>
        <div class="quick-ref-item"><span class="cmd">clear</span><span class="desc">Clear terminal</span></div>
        <div class="quick-ref-item"><span class="cmd">touch</span><span class="desc">Create a file</span></div>
        <div class="quick-ref-item"><span class="cmd">ai</span><span class="desc">Ask the AI assistant</span></div>
      </div>
    </div>
    <h3>📋 Workflow</h3>
    <ol style="margin-bottom:14px;padding-left:22px;color:var(--text)">
      <li>Type <code>help</code> — see every available command</li>
      <li>Type <code>ls</code> — browse files in your virtual drive</li>
      <li>Type <code>touch hello.txt</code> — create a file</li>
      <li>Type <code>edit hello.txt</code> — write something and save</li>
      <li>Type <code>ai "summarize this"</code> — let AI analyze your files</li>
      <li>Type <code>status</code> — check system health</li>
    </ol>
  </section>

  <section>
    <h3>🔧 Quick Start</h3>
    <p>Type <code>help</code> to see all 130+ commands grouped by category. Use <code>help &lt;command&gt;</code> for details on a specific one.</p>
    <p>The <strong>📋 Quick Commands</strong> panel (Ctrl+K) has clickable cards for common tasks.</p>
    <p>For the full reference, switch to the <strong>📘 User Guide</strong> tab — it covers every module, filesystem, AI, skills, configuration, and all extended modules in detail.</p>
  </section>
</div>
  <div class="search-box">
    <input type="text" id="search-input" placeholder="Search docs…" spellcheck="false">
    <button onclick="searchDocs()">Search</button>
  </div>
  <div class="search-result-msg" id="search-result-msg"></div>

  <div class="doc-tab" id="content-dev">
  <section id="dev-api">
    <h2>🔧 Module Development API</h2>
    <h3>Ext Module Structure</h3>
    <p>Modules are ES6 classes with 3 required and 1 optional method:</p>
    <pre><code>class MyModule {
  constructor() { this.commands = {}; this.terminal = null; }
  requirements() { return { met: true, missing: [] }; }
  getHelpInfo() { return { 'mycmd': 'mycmd — What it does' }; }
  registerCommands() { this.commands['mycmd'] = (args) => { /* ... */ }; }
}
// Auto-register:
if (typeof window.webx11 !== 'undefined' && window.webx11) {
  webx11.moduleManager.registerModule(new MyModule(), 'url');
}</code></pre>

    <h3>VFS (Virtual FileSystem) API</h3>
    <p>Access via <code>this.terminal.fs</code>:</p>
    <div class="table-wrap"><table>
      <tr><th>Method</th><th>Returns</th><th>Description</th></tr>
      <tr><td><code>readFile(path)</code></td><td>string or null</td><td>Read file content</td></tr>
      <tr><td><code>writeFile(path, content)</code></td><td>boolean</td><td>Write string to file</td></tr>
      <tr><td><code>ls(path)</code></td><td>array</td><td>List directory entries</td></tr>
      <tr><td><code>mkdir(path)</code></td><td>boolean</td><td>Create directory</td></tr>
      <tr><td><code>rm(path)</code></td><td>boolean</td><td>Remove file</td></tr>
      <tr><td><code>rmdir(path)</code></td><td>boolean</td><td>Remove empty directory</td></tr>
      <tr><td><code>touch(path)</code></td><td>boolean</td><td>Create empty file</td></tr>
      <tr><td><code>cd(path)</code></td><td>boolean</td><td>Change current directory</td></tr>
      <tr><td><code>pwd()</code></td><td>string</td><td>Current directory path</td></tr>
      <tr><td><code>mv(old, new)</code></td><td>boolean</td><td>Move/rename file</td></tr>
      <tr><td><code>cp(src, dst)</code></td><td>boolean</td><td>Copy file</td></tr>
    </table></div>

    <h3>AI Tool Definition Format</h3>
    <p>Add tools to <code>module-aiassist.js</code> in <code>getToolDefinitions()</code> (around line 300):</p>
    <pre><code>{
  type: 'function',
  function: {
    name: 'my_tool',
    description: 'What it does — AI reads this to decide when to call it.',
    parameters: { type: 'object', properties: {
      paramName: { type: 'string', description: 'What this param does' }
    }, required: ['paramName'] }
  }
}</code></pre>
    <p>Then add a <code>case 'my_tool':</code> handler in <code>runTool()</code> (around line 1000). Return <code>JSON.stringify(...)</code>.</p>
  </section>

  <section id="dev-skills">
    <h3>Skill Format</h3>
    <p>Skills are markdown files with YAML frontmatter, stored in <code>/skills/</code> in VFS:</p>
    <pre><code>---
name: my-skill
description: Brief description
tags: [tag1, tag2]
---
# Skill Body

Instructions, examples, and workflows here.</code></pre>
  </section>

  <section id="dev-ollama">
    <h3>OllamaManager API</h3>
    <div class="table-wrap"><table>
      <tr><th>Property/Method</th><th>Description</th></tr>
      <tr><td><code>.endpoint</code></td><td>Current Ollama API URL</td></tr>
      <tr><td><code>.currentModel</code></td><td>Active model name</td></tr>
      <tr><td><code>.models</code></td><td>Array of available models</td></tr>
      <tr><td><code>.connected</code></td><td>Boolean connection state</td></tr>
      <tr><td><code>.connect()</code></td><td>Connect to Ollama, load models</td></tr>
      <tr><td><code>.chatWithTools()</code></td><td>AI chat with tool calling support</td></tr>
    </table></div>
  </section>

  <section id="dev-global">
    <h3>window.webx11 Global</h3>
    <p>The terminal instance is exposed globally as <code>window.webx11</code> (aliased as <code>webx11</code>). This gives access to everything:</p>
    <pre><code>webx11.fs                    // VFS instance
webx11.moduleManager        // Module registry
webx11.ollamaManager        // Ollama connection
webx11.security             // Security manager
webx11.executeCommand(cmd)  // Run a terminal command programmatically
webx11.print(text, type)    // Print to terminal output
webx11.tutorialModule       // Tutorial progress (if active)
webx11.inputField           // DOM input element</code></pre>
  </section>
</div>
<div class="doc-tab" id="content-guide">
  <!-- ── Overview ── -->
  <section id="overview">
    <h2>⛅ Overview</h2>
    <p>WebX11 v4.5.24 is a browser-based Unix-like terminal — dynamic modules, AI assistant (Ollama), persistent virtual filesystem, web search, voice input, code editor, and a full skill system. Everything runs client-side in your browser.</p>
    <div class="feature-grid">
      <div class="feature-card"><h4>🧩 18 Core + 14 Ext</h4><p>Modules loaded at startup. Shell with pipes, redirects, vars, and scripts.</p></div>
      <div class="feature-card"><h4>🤖 Agent with Tools</h4><p>28 tools — file ops, web search, skills, modules. Destructive action confirmations with inline bar + countdown.</p></div>
      <div class="feature-card"><h4>📚 Skills System</h4><p>Persistent procedural memory. Create, patch, search, export skills for repeatable workflows.</p></div>
      <div class="feature-card"><h4>💾 VFS + Sessions</h4><p>Virtual filesystem persists in localStorage. Save/load/export sessions.</p></div>
      <div class="feature-card"><h4>🎤 Voice Input</h4><p>Speech recognition in the terminal. Works in Chrome, Edge, Safari.</p></div>
      <div class="feature-card"><h4>🌐 Web Search</h4><p>SearXNG + DuckDuckGo fallback + URL fetch/extract. All built-in.</p></div>
      <div class="feature-card"><h4>☁️ WebDAV Sync</h4><p>Push, pull, backup VFS to any WebDAV server.</p></div>
      <div class="feature-card"><h4>📱 Mobile First</h4><p>Touch-optimized. <code>srcdoc</code> HTML preview works on mobile.</p></div>
      <div class="feature-card"><h4>✏️ Text Editor</h4><p>Inline VFS editor — <code>edit &lt;path&gt;</code> opens a modal with save/cancel.</p></div>
      <div class="feature-card"><h4>🔗 Aliases</h4><p><code>ll</code>, <code>h</code>, <code>cls</code> built-in. Define custom aliases with <code>alias x=y</code>.</p></div>
    </div>
  </section>

  <!-- ── Quick Start ── -->
  <section id="start">
    <h2>🚀 Quick Start</h2>
    <ol style="margin-bottom:8px">
      <li><strong>Open</strong> <code>index.html</code> in Chrome/Edge</li>
      <li>Watch the splash screen load modules</li>
      <li>Type <code>help</code> + Enter</li>
      <li>Use the quick-action buttons above the input area</li>
    </ol>

    <h3>First Commands</h3>
    <pre><span class="cmt"># List VFS files</span>
ls

<span class="cmt"># List files faster</span>
ll

<span class="cmt"># Connect to Ollama AI</span>
ollamaconnect

<span class="cmt"># Chat with AI</span>
ai what's in this directory?

<span class="cmt"># Create a file</span>
put hello.txt Hello World

<span class="cmt"># Edit a file</span>
edit hello.txt

<span class="cmt"># Search the web</span>
search quantum computing

<span class="cmt"># Find files</span>
find hello

<span class="cmt"># Compare two files</span>
diff a.txt b.txt</pre>

    <div class="callout callout-info">
      <span class="callout-title">⌨️ Keyboard Shortcuts</span>
      <ul style="margin:0">
        <li><strong>Enter</strong> — Execute</li>
        <li><strong>Tab</strong> — Cycle autocomplete</li>
        <li><strong>↑/↓</strong> — Command history</li>
        <li><strong>Esc</strong> — Hide autocomplete / stop AI</li>
        <li><strong>|</strong> — Pipe: <code>ls | grep hello</code></li>
      </ul>
    </div>
  </section>

  <!-- ── Commands ── -->
  <section id="commands">
      <p>📖 <b>New to feedback?</b> <a href="/feedback-guide.html">How feedback works</a> — which channel to use, what gets sent, and when to expect an answer.</p>

<h2>📖 Full Command Reference</h2>

    <div class="callout">
      <strong>⚠️ There is no shell.</strong> The terminal splits your line into argv and hands it to
      one command — it does not interpret <code>;</code>, <code>&amp;&amp;</code>, <code>||</code> or
      redirection. Those are now <em>refused</em> with an explicit message instead of being folded
      into the command's arguments (which used to produce a plausible wrong answer):
      <code>wc -l a &amp;&amp; grep -c x a</code> → refused; run two commands.
      A single <code>cmd | cmd</code> pipeline works in the interactive terminal (not in the AI
      <code>run_command</code> tool). <code>wc</code>, <code>grep</code> and friends take
      <strong>one path per call</strong> unless documented otherwise — <code>wc -c a b</code> now
      prints a line per file plus a <code>total</code>.
    </div>

    <h3>System</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>help</code></td><td>Show all commands</td><td><code>help</code></td></tr>
      <tr><td><code>clear</code> / <code>cls</code></td><td>Clear terminal</td><td><code>cls</code></td></tr>
      <tr><td><code>echo</code></td><td>Print text</td><td><code>echo Hello</code></td></tr>
      <tr><td><code>mem</code></td><td>Show memory usage</td><td><code>mem</code></td></tr>
      <tr><td><code>config</code></td><td>View/set terminal config (max-lines, history, pipe-buffer)</td><td><code>config terminal-max-lines 500</code></td></tr>
      <tr><td><code>status</code></td><td>System status</td><td><code>status</code></td></tr>
      <tr><td><code>font-size</code></td><td>Change font size (8–32)</td><td><code>font-size 16</code></td></tr>
      <tr><td><code>load-local</code></td><td>Load module from VFS or URL</td><td><code>load-local modules/ext/calc.js</code></td></tr>
      <tr><td><code>startup-modules</code></td><td>Open startup module selector</td><td><code>startup-modules</code></td></tr>
      <tr><td><code>preview</code></td><td>Preview HTML in iframe</td><td><code>preview test.html</code></td></tr>
      <tr><td><code>reset mem</code></td><td>Clear AI memory (context, patterns, profile)</td><td><code>reset mem --confirm</code></td></tr>
      <tr><td><code>reset vfs</code></td><td>Clear virtual filesystem to empty root</td><td><code>reset vfs --confirm</code></td></tr>
      <tr><td><code>reset config</code></td><td>Reset all config to defaults</td><td><code>reset config --confirm</code></td></tr>
      <tr><td><code>reset all</code></td><td>Wipe everything (nuclear)</td><td><code>reset all --confirm</code></td></tr>
      <tr><td><code>logrotate</code></td><td>Rotate current.log to dated archive</td><td><code>logrotate</code></td></tr>
      <tr><td><code>health-check</code></td><td>Audit VFS, modules, logs, trash, skills</td><td><code>health-check</code></td></tr>
      <tr><td><code>memory-map-export</code></td><td>Generate memory map from /memory/index.json</td><td><code>memory-map-export</code></td></tr>
      <tr><td><code>checkpoint</code></td><td>Create VFS snapshot</td><td><code>checkpoint</code></td></tr>
      <tr><td><code>checkpoint-list</code></td><td>List VFS checkpoints</td><td><code>checkpoint-list</code></td></tr>
      <tr><td><code>rollback</code></td><td>Restore VFS from checkpoint</td><td><code>rollback</code></td></tr>
      <tr><td><code>checkpoint-del</code></td><td>Delete a checkpoint</td><td><code>checkpoint-del</code></td></tr>
      <tr><td><code>smart-prompt</code></td><td>Toggle context-aware prompt</td><td><code>smart-prompt</code></td></tr>
      <tr><td><code>test</code></td><td>Run test suite</td><td><code>test auto</code></td></tr>
      <tr><td><code>[ … ]</code> / <code>test …</code></td><td>POSIX file and string test for chains — silent, combines with <code>&amp;&amp;</code> / <code>||</code>. Operators: <code>-f</code> <code>-d</code> <code>-e</code> <code>-z</code> <code>-n</code> <code>!</code> <code>=</code> <code>!=</code>. The expression form of <code>test</code> is routed to this; <code>test</code> with no expression still runs the suite.</td><td><code>[ -f /notes.txt ] &amp;&amp; echo yes</code></td></tr>
    </table></div>

    <h3>AI Assistant</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>ai</code> / <code>ask</code></td><td>Chat with AI (tool-calling)</td><td><code>ai create a notes file</code></td></tr>
      <tr><td><code>ai-clear</code></td><td>Reset conversation context</td><td><code>ai-clear</code></td></tr>
      <tr><td><code>ai-system</code></td><td>View/set system prompt</td><td><code>ai-system</code></td></tr>
      <tr><td><code>ai-context</code></td><td>Show conversation memory</td><td><code>ai-context</code></td></tr>
      <tr><td><code>ai-allow</code></td><td>Allow pending destructive action</td><td><code>ai-allow</code></td></tr>
      <tr><td><code>ai-deny</code></td><td>Deny pending destructive action</td><td><code>ai-deny</code></td></tr>
      <tr><td><code>ai-stop</code></td><td>Cancel running AI request</td><td><code>ai-stop</code></td></tr>
      <tr><td><code>ai-compress</code></td><td>Manually compress conversation context</td><td><code>ai-compress</code></td></tr>
      <tr><td><code>ai-config</code></td><td>View/set AI loop config (max-turns, max-context, max-context-tokens, confirm-timeout(0=disabled), chat-lock-timeout, skill-debounce, trivial-optimization, temperature, top-p, max-tokens, thinking) and AI tool budgets in characters (read-page-chars, read-result-chars, tool-context-budget, fetch-chars — each 500-200000; read-page-chars/read-result-chars use the model default when unset)</td><td><code>ai-config max-turns 12</code></td></tr>
      <tr><td><code>ai-stats</code></td><td>Per-tool telemetry for this browser (localStorage <code>webx11_tool_stats</code>): calls, ok %, avg duration, KB returned, truncation rate — for finding which tools flood the AI context</td><td><code>ai-stats</code></td></tr>
      <tr><td><code>debug</code></td><td>Toggle AI debug mode (ext module)</td><td><code>debug</code></td></tr>
      <tr><td><code>debug-ai</code></td><td>Toggle AI tool-call debug panel</td><td><code>debug-ai</code></td></tr>
      <tr><td><code>debug-ai-last</code></td><td>Show last AI response (content, tool calls, errors)</td><td><code>debug-ai-last</code></td></tr>
      <tr><td><code>debug-ai-send</code></td><td>Show what was sent to the AI (messages with roles)</td><td><code>debug-ai-send</code></td></tr>
      <tr><td><code>debug-ai-log</code></td><td>Dump full tool call log for current session</td><td><code>debug-ai-log</code></td></tr>
      <tr><td><code>archive-list</code></td><td>List archived session snapshots</td><td><code>archive-list</code></td></tr>
      <tr><td><code>archive-read</code></td><td>View an archive by filename</td><td><code>archive-read 2026-06-25-14-30.json</code></td></tr>
      <tr><td><code>mem-debug</code></td><td>Memory diagnostic (tool call log, heap, localStorage sizes)</td><td><code>mem-debug</code></td></tr>
      <tr><td><code>reset-mem</code></td><td>Clear AI internal logs without touching VFS/config</td><td><code>reset-mem</code></td></tr>
    </table></div>

    <h3>Debug Supervisor</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>debug-stats</code></td><td>Error summary (total, unique, clusters, top issues)</td><td><code>debug-stats</code></td></tr>
      <tr><td><code>debug-history</code></td><td>Show last N errors with hash, type, severity</td><td><code>debug-history 10</code></td></tr>
      <tr><td><code>debug-analyze</code></td><td>Deep analysis of a specific error (root cause, fix suggestions)</td><td><code>debug-analyze a1b2c3d4</code></td></tr>
      <tr><td><code>debug-trends</code></td><td>Error frequency over time, grouped by day and type</td><td><code>debug-trends 7</code></td></tr>
      <tr><td><code>debug-fix</code></td><td>Suggest and optionally auto-apply fix for an error</td><td><code>debug-fix a1b2c3d4</code></td></tr>
      <tr><td><code>debug-health</code></td><td>Check DebugSupervisorModule health status</td><td><code>debug-health</code></td></tr>
      <tr><td><code>feedback &lt;message&gt;</code></td><td>Send a message to the operator agent (alias <code>hermes</code>); <code>feedback -- &lt;text&gt;</code> forces a message</td><td><code>feedback download link 403s on mobile</code></td></tr>
      <tr><td><code>feedback list [status]</code></td><td>List stored /stear reports — status <code>new</code>, <code>read</code> or <code>archived</code> (admin)</td><td><code>feedback list new</code></td></tr>
      <tr><td><code>feedback read &lt;id&gt;</code></td><td>Show one report in full, including any reply (admin)</td><td><code>feedback read 12</code></td></tr>
      <tr><td><code>feedback reply &lt;id&gt; &lt;text&gt;</code></td><td>Publish a reply — the reporter sees it in /stear → My reports; status becomes read (admin)</td><td><code>feedback reply 12 shipped in v4.6.92</code></td></tr>
      <tr><td><code>feedback archive|reopen &lt;id&gt;</code></td><td>Move a report between archived and new (admin)</td><td><code>feedback archive 12</code></td></tr>
      <tr><td><code>feedback stats</code></td><td>Counts per status plus the dashboard URL (admin)</td><td><code>feedback stats</code></td></tr>
      <tr><td><code>feedback dashboard</code></td><td>Open /admin/feedback.html in a new tab (admin)</td><td><code>feedback dashboard</code></td></tr>
      <tr><td><code>feedback-admin &lt;sub&gt;</code></td><td>Admin alias for the feedback subcommands (<code>list|read|reply|archive|reopen|stats|dashboard</code>)</td><td><code>feedback-admin stats</code></td></tr>
    </table></div>



    <h3>Skills</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>skill-list</code></td><td>List all skills</td><td><code>skill-list</code></td></tr>
      <tr><td><code>skill-view</code></td><td>View skill content</td><td><code>skill-view web-scraper</code></td></tr>
      <tr><td><code>skill-create</code></td><td>Create a skill</td><td><code>skill-create name desc "steps" tags</code></td></tr>
      <tr><td><code>skill-patch</code></td><td>Update a skill</td><td><code>skill-patch name "new content"</code></td></tr>
      <tr><td><code>skill-delete</code></td><td>Delete a skill</td><td><code>skill-delete oldskill</code></td></tr>
      <tr><td><code>skill-export</code></td><td>Export skill to JSON</td><td><code>skill-export myskill</code></td></tr>
      <tr><td><code>skill-import</code></td><td>Import skill from JSON</td><td><code>skill-import</code></td></tr>
      <tr><td><code>skill-sync</code></td><td>Rebuild skill index</td><td><code>skill-sync</code></td></tr>
      <tr><td><code>skill-webdav-sync</code></td><td>Push all skills to WebDAV as JSON</td><td><code>skill-webdav-sync</code></td></tr>
    </table></div>

    <h3>Config</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>config</code></td><td>Get a config value</td><td><code>config</code></td></tr>
      <tr><td><code>config-set</code></td><td>Set a config value</td><td><code>config-set key value</code></td></tr>
      <tr><td><code>config-list</code></td><td>List all config</td><td><code>config-list</code></td></tr>
      <tr><td><code>config-delete</code></td><td>Delete a config entry</td><td><code>config-delete key</code></td></tr>
      <tr><td><code>config-export</code></td><td>Export config as JSON</td><td><code>config-export</code></td></tr>
      <tr><td><code>config-reset</code></td><td>Reset all config</td><td><code>config-reset</code></td></tr>
    </table></div>
  </section>

  <!-- ── Filesystem ── -->
  <section id="guides">
    <h2>📚 Guides</h2>
    <p>Long-form guides live in the VFS under <code>/guides/</code>. The AI writes them there; you can
    reach them three ways:</p>
    <ul>
      <li><code>guides</code> — list what exists, newest first (this is the index that did not exist before v4.6.63)</li>
      <li><code>preview &lt;name&gt;</code> — render an HTML guide in the preview pane</li>
      <li><code>cat &lt;name&gt;</code> — read a markdown guide as text</li>
    </ul>
    <p>Published guides on this server:</p>
    <ul>
      <li><a href="../agando/guides/newos-future.html">newOS4 — future directions</a></li>
      <li><a href="../agando/guides/request-to-newos4-team.md">Request to the newOS4 team (2026-10-23)</a></li>
    </ul>
  </section>

  <section id="filesystem">
    <h2>📁 Filesystem</h2>
    <p>All VFS files persist in <code>localStorage</code>. <code>ls</code>, <code>cd</code>, <code>pwd</code> work like a real terminal. Clickable output — tap a file to <code>cat</code>, tap a dir to <code>cd</code>.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>ls</code> / <code>ll</code></td><td>List files</td><td><code>ll</code></td></tr>
      <tr><td><code>cd</code></td><td>Change directory</td><td><code>cd notes</code></td></tr>
      <tr><td><code>pwd</code></td><td>Print working directory</td><td><code>pwd</code></td></tr>
      <tr><td><code>cat</code></td><td>View file</td><td><code>cat readme.txt</code></td></tr>
      <tr><td><code>put</code></td><td>Create file with content</td><td><code>put hello.txt Hello World</code></td></tr>
      <tr><td><code>edit</code></td><td>Open in modal editor</td><td><code>edit notes.md</code></td></tr>
      <tr><td><code>rm</code></td><td>Delete file</td><td><code>rm temp.txt</code></td></tr>
      <tr><td><code>mkdir</code></td><td>Create directory</td><td><code>mkdir projects</code></td></tr>
      <tr><td><code>rmdir</code></td><td>Remove directory</td><td><code>rmdir empty</code></td></tr>
      <tr><td><code>trash</code></td><td>Move file to trash</td><td><code>trash temp.txt</code></td></tr>
      <tr><td><code>trash-dir</code></td><td>Move directory to trash</td><td><code>trash-dir olddir</code></td></tr>
      <tr><td><code>ls-trash</code></td><td>List items in trash</td><td><code>ls-trash</code></td></tr>
      <tr><td><code>empty-trash</code></td><td>Permanently delete all trash items</td><td><code>empty-trash</code></td></tr>
      <tr><td><code>mv</code></td><td>Move/rename</td><td><code>mv old.txt new.txt</code></td></tr>
      <tr><td><code>cp</code></td><td>Copy file</td><td><code>cp a.txt b.txt</code></td></tr>
      <tr><td><code>touch</code></td><td>Create empty file</td><td><code>touch newfile.txt</code></td></tr>
      <tr><td><code>tree</code></td><td>Directory tree</td><td><code>tree</code></td></tr>
      <tr><td><code>find</code></td><td>Recursive file search</td><td><code>find .txt</code></td></tr>
      <tr><td><code>diff</code></td><td>Compare two files</td><td><code>diff a.txt b.txt</code></td></tr>
      <tr><td><code>grep</code></td><td>Search file contents</td><td><code>grep hello *.txt</code></td></tr>
      <tr><td><code>head</code></td><td>First N lines</td><td><code>head file.txt 10</code></td></tr>
      <tr><td><code>tail</code></td><td>Last N lines</td><td><code>tail file.txt 10</code></td></tr>
      <tr><td><code>sort</code></td><td>Sort file lines</td><td><code>sort file.txt</code></td></tr>
      <tr><td><code>wc</code></td><td>Count lines/words/chars</td><td><code>wc file.txt</code></td></tr>
      <tr><td><code>du</code></td><td>Disk usage</td><td><code>du</code></td></tr>
      <tr><td><code>upload</code></td><td>Upload file from device</td><td><code>upload</code></td></tr>
      <tr><td><code>download</code></td><td>Download file</td><td><code>download file.txt</code></td></tr>
      <tr><td><code>vfs-size</code></td><td>Show VFS size report (top files, system dirs)</td><td><code>vfs-size</code></td></tr>
      <tr><td><code>vfs-clean</code></td><td>Nuke snapshots, sessions, and trash</td><td><code>vfs-clean</code></td></tr>
      <tr><td><code>vfs-export</code></td><td>Download VFS as JSON</td><td><code>vfs-export</code></td></tr>
      <tr><td><code>vfs-import</code></td><td>Import VFS from JSON</td><td><code>vfs-import</code></td></tr>
      <tr><td><code>session-save</code></td><td>Save a session snapshot</td><td><code>session-save</code></td></tr>
      <tr><td><code>session-load</code></td><td>Load a session snapshot</td><td><code>session-load mysession</code></td></tr>
      <tr><td><code>session-list</code></td><td>List all saved sessions</td><td><code>session-list</code></td></tr>
      <tr><td><code>session-delete</code></td><td>Delete a session</td><td><code>session-delete old</code></td></tr>
      <tr><td><code>session-export</code></td><td>Export session as JSON download</td><td><code>session-export mysession</code></td></tr>
      <tr><td><code>session-import</code></td><td>Import a session from file</td><td><code>session-import</code></td></tr>
          <tr><td><code>sed -n &#x27;N,Mp&#x27; | s/a/b/ | /pat/d | -i</code></td><td>Print or edit VFS file lines</td></tr>
      <tr><td><code>files</code></td><td>Open the Files panel</td></tr>
</table></div>
  </section>

  <!-- ── AI Agent ── -->
  <section id="ai">
    <h2>🤖 AI Assistant</h2>
    <div class="callout callout-success">
      <span class="callout-title">Tool-Calling Agent</span>
      The AI runs a full agent loop with 28 tools: filesystem, web search, URL fetch, skills, WPM, session memory, user profile, module introspection.
    </div>

    <h3>How It Works</h3>
    <ol>
      <li>Type <code>ai &lt;request&gt;</code></li>
      <li>AI loads relevant skills + recent session memory</li>
      <li>Decides which tools to call (up to 8 turns)</li>
      <li><strong>Destructive tools</strong> trigger an inline confirm bar — no dark overlay</li>
      <li>120s countdown: yellow → bold red at 30s → pulsing at 10s</li>
      <li>Type <code>ai-allow</code> / <code>ai-deny</code> or tap the buttons</li>
      <li>After complex tasks, AI suggests creating a skill</li>
    </ol>

    <div class="callout callout-warning">
      <span class="callout-title">⚠️ Destructive Tools</span>
      <code>write_file</code>, <code>delete_file</code>, <code>make_directory</code>, <code>edit_module</code> require confirmation before executing. <code>run_command</code> only requires confirmation for destructive commands (rm, kill, format) — safe-read commands like <code>ls</code>, <code>find</code>, <code>tree</code> are auto-approved.
    </div>

    <h3>Available Tools</h3>
    <div class="table-wrap"><table>
      <tr><th>Tool</th><th>Description</th><th>Destructive?</th></tr>
      <tr><td><code>list_files</code></td><td>List VFS directory</td><td>❌</td></tr>
      <tr><td><code>read_file</code></td><td>Read file (8k trunc)</td><td>❌</td></tr>
      <tr><td><code>write_file</code></td><td>Write to file</td><td>✅</td></tr>
      <tr><td><code>make_directory</code></td><td>Create directory</td><td>✅</td></tr>
      <tr><td><code>delete_file</code></td><td>Delete file/dir</td><td>✅</td></tr>
      <tr><td><code>get_status</code></td><td>System status</td><td>❌</td></tr>
      <tr><td><code>get_help</code></td><td>List commands</td><td>❌</td></tr>
      <tr><td><code>web_search</code></td><td>SearXNG + DDG</td><td>❌</td></tr>
      <tr><td><code>web_fetch</code></td><td>Extract URL content</td><td>❌</td></tr>
      <tr><td><code>run_command</code></td><td>Execute terminal cmd (safe-read auto-approved)</td><td>❌ (only destructive cmds)</td></tr>
      <tr><td><code>load_skills</code></td><td>Search relevant skills</td><td>❌</td></tr>
      <tr><td><code>create/patch/list_skills</code></td><td>Skill management</td><td>❌</td></tr>
      <tr><td><code>view/edit/test/reload</code></td><td>Module operations</td><td>edit ✅</td></tr>
      <tr><td><code>user_get/set/list/forget</code></td><td>User profile</td><td>❌</td></tr>
      <tr><td><code>session_save/load/recent/stats</code></td><td>Session memory</td><td>❌</td></tr>
      <tr><td><code>vaultmind_connect</code></td><td>Connect wallet to VaultMind AI (reads key from SecretVault)</td><td>❌</td></tr>
      <tr><td><code>vaultmind_status</code></td><td>Check VaultMind session status</td><td>❌</td></tr>
      <tr><td><code>vaultmind_query</code></td><td>Query VaultMind: prices, portfolio, chat</td><td>❌</td></tr>
          <tr><td><code>webx &lt;question&gt;</code></td><td>Ask the assistant (short alias of <code>webxai</code>)</td></tr>
      <tr><td><code>webxai &lt;question&gt;</code></td><td>Ask the assistant a one-off question</td></tr>
      <tr><td><code>wx &lt;question&gt;</code></td><td>Alias of <code>webxai</code></td></tr>
      <tr><td><code>ai-model [name]</code></td><td>Show or set the active model</td></tr>
      <tr><td><code>ai-ignore &lt;path&gt;</code></td><td>Exclude a path from AI context</td></tr>
      <tr><td><code>commit-status</code></td><td>Show the pending AI file-commit batch</td></tr>
      <tr><td><code>commit-approve</code></td><td>Apply the pending AI file commits</td></tr>
      <tr><td><code>commit-deny</code></td><td>Discard the pending AI file commits</td></tr>
      <tr><td><code>context</code></td><td>Show the active AI context profile</td></tr>
      <tr><td><code>contexts</code></td><td>List context profiles</td></tr>
      <tr><td><code>context-new &lt;name&gt; &lt;display&gt; &lt;systemPrompt&gt;</code></td><td>Create a context profile</td></tr>
      <tr><td><code>context-delete &lt;name&gt;</code></td><td>Delete a context profile</td></tr>
      <tr><td><code>context-auto on|off</code></td><td>Auto-switch contexts</td></tr>
      <tr><td><code>smart-ask &lt;question&gt;</code></td><td>Ask with automatic context selection</td></tr>
</table></div>

    <h3>Sound Notification</h3>
    <p>A short <strong>"ding"</strong> plays via WebAudio when AI finishes. Toggle with the <strong>🔊 Sound</strong> button in quick-actions. Persists in localStorage.</p>
  </section>

  <!-- ── Agent Loop Studio ── -->
  <section id="agent-loops">
    <h2>🔄 Agent Loop Studio</h2>
    <div class="callout callout-success">
      <span class="callout-title">Pluggable Agent Loops</span>
      Switch between profiles that control max turns, tool sets, temperature, system prompt directives, and loop behavior — without restarting.
    </div>

    <h3>Commands</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>agent-loops</code></td><td>List all profiles with turns, tools, and benchmark results</td></tr>
      <tr><td><code>agent-loops &lt;name&gt;</code></td><td>Switch to a named profile</td></tr>
      <tr><td><code>agent-loops new &lt;name&gt; &lt;desc&gt;</code></td><td>Create a new profile from defaults</td></tr>
      <tr><td><code>agent-loops edit &lt;name&gt; &lt;key&gt; &lt;val&gt;</code></td><td>Edit a profile setting (dot-notation, e.g. <code>loop.maxTurns 12</code>)</td></tr>
      <tr><td><code>agent-loops delete &lt;name&gt;</code></td><td>Delete a profile (not default)</td></tr>
      <tr><td><code>agent-loops clone &lt;src&gt; &lt;dst&gt;</code></td><td>Clone a profile</td></tr>
      <tr><td><code>agent-loops export &lt;name&gt;</code></td><td>Export profile as JSON</td></tr>
      <tr><td><code>agent-loops reset &lt;name&gt;</code></td><td>Reset profile to defaults</td></tr>
      <tr><td><code>bench &lt;profile&gt; [--tasks=ids]</code></td><td>Run benchmark suite on a profile (6 tasks: fs-navigate, fs-create-read, nvfs-resolve, web-search, multi-tool, code-edit)</td></tr>
      <tr><td><code>bench-compare &lt;p1&gt; &lt;p2&gt;</code></td><td>Compare benchmark results of two profiles</td></tr>
    </table></div>

    <h3>Default Profiles</h3>
    <div class="table-wrap"><table>
      <tr><th>Profile</th><th>Turns</th><th>Tools</th><th>Temp</th><th>Use Case</th></tr>
      <tr><td><code>default</code></td><td>8</td><td>all</td><td>inherit</td><td>Balanced general-purpose</td></tr>
      <tr><td><code>minimal</code></td><td>4</td><td>4 (custom)</td><td>0.3</td><td>Fast, low-token simple tasks</td></tr>
      <tr><td><code>research</code></td><td>6</td><td>7 (custom)</td><td>0.5</td><td>Read-only web + file exploration</td></tr>
      <tr><td><code>safe</code></td><td>8</td><td>all (destructive disabled)</td><td>0.5</td><td>No destructive tools</td></tr>
      <tr><td><code>creative</code></td><td>12</td><td>all</td><td>0.9</td><td>More turns, higher creativity</td></tr>
      <tr><td><code>coder</code></td><td>10</td><td>all</td><td>0.2</td><td>Code-focused with append directive</td></tr>
    </table></div>

    <h3>System Prompt Layering</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Effect</th></tr>
      <tr><td><code>ai-system +"directive"</code></td><td>Prepend a directive to the active profile's system prompt (persists to profile)</td></tr>
      <tr><td><code>ai-system -"directive"</code></td><td>Append a directive to the active profile's system prompt (persists to profile)</td></tr>
      <tr><td><code>ai-system "text"</code></td><td>Full replace (persists to localStorage, overrides profile)</td></tr>
      <tr><td><code>ai-system reset</code></td><td>Restore default system prompt</td></tr>
    </table></div>

    <h3>Self-Improvement</h3>
    <p>After each AI run, <code>_postRunReview()</code> detects anomalies: near-max-turns, high token usage, tool failures, and above-benchmark consumption. Lessons are auto-saved as VFS skills under <code>/skills/loop-lesson-*</code>.</p>

    <h3>AI Tools</h3>
    <p>The AI can also manage profiles via tools: <code>agent_loop_list</code>, <code>agent_loop_switch</code>, <code>agent_loop_create</code>, <code>agent_loop_benchmark</code>.</p>
  </section>

  <!-- ── Skills ── -->
  <section id="skills">
    <h2>📚 Skills System</h2>
    <div class="callout callout-success">
      <span class="callout-title">Dynamic Browser</span>
      Skills are now in a <strong><a href="skills.html" target="_blank">dedicated dynamic page →</a></strong>. Search, filter by category, browse all 17 skills with descriptions and tags — no more hardcoded lists.
    </div>
    <div class="feature-grid" style="margin-top:14px">
      <div class="feature-card"><h4>📄 <a href="skills.html">skills.html</a></h4><p>Dynamic skill browser — searchable, filterable card grid with tag badges, category pills, and update dates. Zero hardcoded data.</p></div>
      <div class="feature-card"><h4>📘 <a href="guide.html">guide.html</a></h4><p>Quick user guide with anchor-navigable sections, module refs, and command examples.</p></div>
    </div>
    <h3>Terminal Commands</h3>
    <pre><span class="cmt"># List all skills</span>
skill-list

<span class="cmt"># Create a skill</span>
skill-create my-skill "Does X" "Steps to do X" "tag1,tag2"

<span class="cmt"># View / patch / delete</span>
skill-view my-skill
skill-patch my-skill "Updated steps"
skill-delete my-skill

<span class="cmt"># Export / Import</span>
skill-export my-skill
skill-import</pre>

    <h3>Auto-Creation</h3>
    <p>When the AI encounters the same tool error 3+ times, a workaround skill is auto-created. Every 20 messages, skills are audited for staleness.</p>
      <table>
      <thead><tr><th>Command</th><th>Description</th></tr></thead>
      <tbody>
      <tr><td><code>learn-skill &lt;topic&gt;</code></td><td>Learn a new skill from a topic</td></tr>
      <tr><td><code>skill-validate &lt;name&gt;</code></td><td>Validate a skill file</td></tr>
      <tr><td><code>skill-audit</code></td><td>Audit all installed skills</td></tr>
      <tr><td><code>skill-restore &lt;name&gt;</code></td><td>Restore a skill from its backup</td></tr>
      <tr><td><code>skill-pack-core</code></td><td>Install / verify the core skill pack</td></tr>
      </tbody>
    </table>

</section>

  <!-- ── Ollama ── -->
  <section id="ollama">
    <h2>🤖 Ollama</h2>
    <div class="callout callout-ollama">
      <span class="callout-title">Local or Remote AI</span>
      WebX11 connects to any Ollama instance. All tool-calling and chat features require a connection.
    </div>

    <h3>Setup</h3>
    <pre><span class="cmt"># Install & pull a model</span>
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama2

<span class="cmt"># Start Ollama</span>
ollama serve

<span class="cmt"># In WebX11</span>
ollamaconnect</pre>

    <h3>Commands</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>ollamaconnect</code></td><td>Connect to Ollama</td></tr>
      <tr><td><code>ollamasetproxy</code></td><td>Set remote endpoint</td></tr>
      <tr><td><code>ollamamodels</code></td><td>List models</td></tr>
      <tr><td><code>ollamasetmodel</code></td><td>Set active model</td></tr>
      <tr><td><code>ollamadisconnect</code></td><td>Disconnect</td></tr>
      <tr><td><code>ollama</code></td><td>Open Ollama Manager UI</td></tr>
      <tr><td><code>models</code></td><td>List all models</td></tr>
      <tr><td><code>model-info</code></td><td>Model details</td></tr>
      <tr><td><code>model-pull</code></td><td>Pull a model</td></tr>
      <tr><td><code>model-delete</code></td><td>Delete a model</td></tr>
      <tr><td><code>model-run</code></td><td>Run model with prompt</td></tr>
    </table></div>

    <div class="callout callout-warning">
      <span class="callout-title">🔌 CORS for Remote</span>
      <code>OLLAMA_ORIGINS="*" ollama serve</code>
    </div>
  </section>

  <!-- ── Search & Web ── -->
  <section id="web">
    <h2>🌐 Search & Web</h2>
    <div class="callout callout-info">
      <span class="callout-title">SearXNG + DDG + URL Fetcher</span>
      Three modules provide comprehensive web capabilities via the proxy API.
    </div>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Module</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>search</code> / <code>s</code></td><td>SearXNG</td><td>Web search</td><td><code>search raspberry pi</code></td></tr>

      <tr><td><code>fetch</code> / <code>web</code></td><td>Fetcher</td><td>Fetch URL content</td><td><code>fetch https://example.com</code></td></tr>
      <tr><td><code>extract</code></td><td>Fetcher</td><td>Clean readable text</td><td><code>extract https://news.article</code></td></tr>
      <tr><td><code>images</code></td><td>SearXNG</td><td>Image search</td><td><code>images cats</code></td></tr>
          <tr><td><code>videos &lt;query&gt;</code></td><td>Video search via SearXNG</td></tr>
</table></div>
    <p>The AI agent also has <code>web_search</code> and <code>web_fetch</code> tools using the same APIs.</p>
  </section>

  <!-- ── Voice & Sound ── -->
  <section id="voice">
    <h2>🎤 Voice & Sound</h2>
    <div class="callout callout-success">
      <span class="callout-title">Speech Recognition</span>
      A <strong>🎤 button</strong> in the input area activates SpeechRecognition. Chrome, Edge, Safari 14.1+. Not Firefox.
    </div>
    <ul>
      <li>Tap 🎤 to start listening — button pulses green</li>
      <li>Say your command — recognized text fills the input</li>
      <li>Tap again or wait to stop</li>
      <li>Red flash indicates failure</li>
    </ul>
    <h3>Sound</h3>
    <p>Toggle AI response "ding" with the <strong>🔊 Sound</strong> button. Persists in localStorage.</p>
      <table>
      <thead><tr><th>Command</th><th>Description</th></tr></thead>
      <tbody>
      <tr><td><code>speak &lt;text&gt;</code></td><td>Speak text aloud (TTS)</td></tr>
      <tr><td><code>voice</code></td><td>Voice settings and microphone test</td></tr>
      <tr><td><code>analyze &lt;file&gt; [--frames N] [--spectrogram] [--beats] [--scene]</code></td><td>Analyze an audio or video file</td></tr>
      </tbody>
    </table>

</section>

  <!-- ── Config ── -->
  <section id="config">
    <h2>⚙️ Configuration</h2>
    <p>All config values stored as <code>webx11_config_*</code> in localStorage. Use the ⚙ Config button or CLI commands.</p>
    <h3>Notable Keys</h3>
    <div class="table-wrap"><table>
      <tr><th>Key</th><th>Description</th><th>Values</th></tr>
      <tr><td><code>webx11_config_ai_sound</code></td><td>AI sound toggle</td><td><code>on</code>, <code>off</code></td></tr>
      <tr><td><code>webx11_config_voice_visible</code></td><td>Mic button visibility</td><td><code>on</code>, <code>off</code></td></tr>
    </table></div>
    <h3>Persisted State</h3>
    <div class="table-wrap"><table>
      <tr><th>Key</th><th>Description</th></tr>
      <tr><td><code>webx11_filesystem</code></td><td>VFS JSON</td></tr>
      <tr><td><code>webx11_modules</code></td><td>Loaded module URLs</td></tr>
      <tr><td><code>webx11_ollama_endpoint</code></td><td>Ollama API URL</td></tr>
      <tr><td><code>webx11_ollama_model</code></td><td>Selected model</td></tr>
      <tr><td><code>webx11_startup_modules</code></td><td>Startup selection</td></tr>
      <tr><td><code>webx11_font_size</code></td><td>Font size (8–32)</td></tr>
      <tr><td><code>webx11_command_history</code></td><td>Command history</td></tr>
      <tr><td><code>webx11_terminal_output</code></td><td>Persisted output</td></tr>
      <tr><td><code>webx11_ai_context</code></td><td>AI conversation history</td></tr>
      <tr><td><code>webx11_user_profile</code></td><td>AI user profile</td></tr>
      <tr><td><code>webx11_aliases</code></td><td>User-defined aliases</td></tr>
          <tr><td><code>bug</code></td><td>Generate a bug report from the current session</td></tr>
      <tr><td><code>factory-reset-old --confirm</code></td><td>Legacy full reset (prefer <code>factory-reset</code>)</td></tr>
      <tr><td><code>setfont &lt;px&gt;</code></td><td>Set terminal font size (alias of <code>font-size</code>)</td></tr>
</table></div>
  </section>

  <!-- ── Secret Vault ── -->
  <section id="vault">
    <h2>🔒 Secret Vault</h2>
    <div class="callout callout-success">
      <span class="callout-title">Encrypted Secrets Manager</span>
      AES-256-GCM encrypted key-value storage in localStorage. Lock/unlock with a PIN — secrets are never stored in plain text. Vault status persists across sessions.
    </div>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>secret-set</code></td><td>Encrypt and store a secret</td></tr>
      <tr><td><code>secret-get</code></td><td>Decrypt and display a secret value</td></tr>
      <tr><td><code>secret-list</code></td><td>List all stored secret names</td></tr>
      <tr><td><code>secret-del</code></td><td>Remove a stored secret</td></tr>
      <tr><td><code>secret-lock</code></td><td>Lock the vault (clears key from memory)</td></tr>
      <tr><td><code>secret-unlock</code></td><td>Unlock the vault with PIN</td></tr>
      <tr><td><code>secret-setpin</code></td><td>Set or change vault PIN</td></tr>
      <tr><td><code>secret-status</code></td><td>Show vault status (locked/unlocked/pin set)</td></tr>
          <tr><td><code>encrypt &lt;path&gt; &lt;passphrase&gt;</code></td><td>AES-256-GCM encrypt a VFS file</td></tr>
      <tr><td><code>decrypt &lt;path.enc&gt; &lt;passphrase&gt;</code></td><td>Decrypt a .enc file</td></tr>
</table></div>
  </section>

  <!-- ── VaultMind AI ── -->
  <section id="vaultmind">
    <h2>🧠 VaultMind AI</h2>
    <div class="callout callout-success">
      <span class="callout-title">Hyperliquid AI Assistant</span>
      VaultMind is an AI-powered wallet assistant for Hyperliquid. It provides market data, portfolio analysis, transaction analysis, and AI chat agents.
    </div>

    <h3>Setup</h3>
    <ol>
      <li>Store your Hyperliquid private key: <code>secret-set hyperliquid_key 0x...</code></li>
      <li>Ask the AI to connect: <code>ai connect to vaultmind</code> or use the <code>vaultmind_connect</code> tool</li>
      <li>Check status: <code>ai check vaultmind status</code> or <code>vaultmind_status</code></li>
    </ol>

    <h3>AI Tools</h3>
    <div class="table-wrap"><table>
      <tr><th>Tool</th><th>Description</th></tr>
      <tr><td><code>vaultmind_connect</code></td><td>Reads <code>hyperliquid_key</code> from SecretVault, authenticates with VaultMind backend, stores session token</td></tr>
      <tr><td><code>vaultmind_status</code></td><td>Checks if a valid VaultMind session token exists in localStorage</td></tr>
      <tr><td><code>vaultmind_query</code></td><td>Query endpoints: <code>prices</code>, <code>portfolio</code>, <code>transactions</code>, <code>copy-trade</code>, or <code>chat</code> with an AI agent</td></tr>
    </table></div>

    <h3>API Endpoints (proxied via nginx)</h3>
    <div class="table-wrap"><table>
      <tr><th>Path</th><th>Backend</th></tr>
      <tr><td><code>/vmai/</code></td><td>Proxied to VaultMind backend at <code>127.0.0.1:8000</code></td></tr>
      <tr><td><code>/vmai-api/</code></td><td>Alias for frontend chat — also proxied to <code>127.0.0.1:8000</code></td></tr>
          <tr><td><code>vaultmind-connect</code></td><td>Connect VaultMind to the trading API</td></tr>
      <tr><td><code>vaultmind-status</code></td><td>VaultMind connection and balance status</td></tr>
      <tr><td><code>vaultmind-query &lt;prices|portfolio|transactions|copy-trade|chat&gt;</code></td><td>Query VaultMind</td></tr>
      <tr><td><code>wallet-lookup &lt;address&gt;</code></td><td>Look up a wallet address</td></tr>
</table></div>
  </section>

  <!-- ── Modules ── -->
  <section id="modules">
    <h2>🧩 Module System</h2>
    <div class="callout callout-info">
      <span class="callout-title">25 Core + 17 Ext</span>
      Modules loaded in dependency order at startup. Toggle ext modules with ⚙ gear on splash.
    </div>
    <h3>Commands</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>modules</code></td><td>Open Module Manager UI</td></tr>
      <tr><td><code>loadmod &lt;url&gt;</code></td><td>Load module from URL</td></tr>
      <tr><td><code>removemod &lt;name&gt;</code></td><td>Remove a module</td></tr>
      <tr><td><code>listmods</code></td><td>List all loaded modules</td></tr>
      <tr><td><code>load-local</code></td><td>Load module from VFS or URL</td></tr>
      <tr><td><code>loadlocal</code></td><td>Alias for load-local</td></tr>
      <tr><td><code>js &lt;expr&gt;</code></td><td>Evaluate JavaScript in page context (browser only — no Node built-ins such as <code>fs</code>)</td></tr>
      <tr><td><code>js-run &lt;path&gt;</code></td><td>Load and execute a JS file from VFS (browser only — no Node built-ins)</td></tr>
      <tr><td><code>startup-modules</code></td><td>Configure boot modules</td></tr>
          <tr><td><code>module-load &lt;name&gt;</code></td><td>Load a module by name</td></tr>
      <tr><td><code>module-unload &lt;name&gt;</code></td><td>Unload a module</td></tr>
      <tr><td><code>module-enable &lt;name&gt;</code></td><td>Enable a module for startup</td></tr>
      <tr><td><code>module-reset &lt;name&gt;</code></td><td>Reset a module to its shipped source</td></tr>
</table></div>

    <h3>Boot Order</h3>
    <ol>
      <li>Splash screen with ⚙ gear</li>
      <li>Foundation: <code>virtual-fs.js</code> → <code>module-manager.js</code> → <code>ollama-manager.js</code> → <code>terminal.js</code></li>
      <li>Built-in modules loaded async</li>
      <li>Ext modules loaded if selected</li>
      <li>Splash hides, terminal ready</li>
    </ol>

    <h3>Code Editor</h3>
    <p>The AI can <code>edit_module(name)</code> to copy source into the Code Editor modal. Edit inline, then <strong>💾 Save & Test</strong> to load live from <code>/_mods/</code>. Use <code>test_module</code> without reloading the page.</p>
    <p>You can also type <code>edit modules/ext/foo.js</code> — the editor now mirrors saves to <code>_mods/&lt;name&gt;.js</code> so <code>test_module</code> works from either path.</p>
  </section>

  <!-- ── Extras ── -->
  <section id="extras">
    <h2>🧰 Extended Modules</h2>

    <h3>WebDAV Sync</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>webdav-config</code></td><td>Configure server</td></tr>
      <tr><td><code>webdav-status</code></td><td>Connection status</td></tr>
      <tr><td><code>webdav-ls</code></td><td>List remote dir</td></tr>
      <tr><td><code>webdav-push</code></td><td>Push file</td></tr>
      <tr><td><code>webdav-pull</code></td><td>Pull file</td></tr>
      <tr><td><code>webdav-backup</code></td><td>Backup VFS</td></tr>
      <tr><td><code>webdav-restore</code></td><td>Restore VFS</td></tr>
      <tr><td><code>webdav-backup-list</code></td><td>List backups</td></tr>
      <tr><td><code>webdav-browser</code></td><td>Visual file explorer modal</td></tr>
    </table></div>

    <h3>Calculator & Cron</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Module</th><th>Description</th></tr>
      <tr><td><code>calc</code></td><td>calc.js</td><td>Evaluate math / unit conversion</td></tr>
      <tr><td><code>cron-every</code></td><td>cron.js</td><td>Schedule a command</td></tr>
      <tr><td><code>cron-list</code></td><td>cron.js</td><td>List scheduled jobs</td></tr>
      <tr><td><code>cron-stop</code></td><td>cron.js</td><td>Stop a job</td></tr>
      <tr><td><code>cron-clear</code></td><td>cron.js</td><td>Clear all jobs</td></tr>
    </table></div>

    <h3>Theme, WPM & Mindmap</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Module</th><th>Description</th></tr>
      <tr><td><code>theme</code></td><td>theme.js</td><td>Set color theme (dark, light, amber, cyber, …)</td></tr>
      <tr><td><code>wpm</code></td><td>wpm.js</td><td>Package manager</td></tr>
      <tr><td><code>mindmap</code></td><td>mindmap.js</td><td>Show file structure as mindmap</td></tr>
    </table></div>

    <h3>Server Monitor</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>server</code></td><td>Add server to monitor</td></tr>
      <tr><td><code>servers</code></td><td>List monitored servers</td></tr>
      <tr><td><code>server-check</code></td><td>Ping a server</td></tr>
      <tr><td><code>server-remove</code></td><td>Remove server</td></tr>
      <tr><td><code>monitor</code></td><td>Toggle auto-monitoring</td></tr>
          <tr><td><code>course open &lt;lessonId&gt; | course list</code></td><td>Course browser</td></tr>
      <tr><td><code>kanban add &lt;task&gt; | list | done &lt;id&gt;</code></td><td>Task board</td></tr>
      <tr><td><code>three add text &lt;text&gt; | reset | screenshot</code></td><td>3D scene commands</td></tr>
      <tr><td><code>gui-run &lt;command&gt;</code></td><td>Run a command and render its output in the GUI panel</td></tr>
      <tr><td><code>gui-text &lt;content&gt;</code></td><td>Render text in the GUI panel</td></tr>
      <tr><td><code>gui-clear</code></td><td>Clear the GUI panel</td></tr>
      <tr><td><code>gzip &lt;path&gt;</code></td><td>Compress a VFS file to .gz</td></tr>
      <tr><td><code>wget &lt;url&gt; [filename]</code></td><td>Download a URL and save it to the VFS</td></tr>
</table></div>



    <h3>Aliases</h3>
    <p>Built-in: <code>ll</code> = <code>ls</code>, <code>h</code> = <code>help</code>, <code>cls</code> = <code>clear</code>. Define custom: <code>alias x=ls -la</code>. Remove: <code>unalias x</code>. Persists in localStorage.</p>
  </section>

  <!-- ── BusyBox ── -->
  <section id="busybox">
    <h2>🔧 BusyBox Utilities</h2>
    <div class="callout callout-success">
      <span class="callout-title">16 Unix Utility Commands</span>
      Lightweight utility commands for everyday terminal work — identity, path, text, and system info tools. All work standalone and with shell pipes.
    </div>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>which</code></td><td>Locate command in module registry + fuzzy suggestions</td><td><code>which ls</code></td></tr>
      <tr><td><code>env</code></td><td>List local env vars (webx11_, ollama, user profile)</td><td><code>env</code></td></tr>
      <tr><td><code>date</code></td><td>Current time (local, ISO, UTC, Unix timestamp)</td><td><code>date</code></td></tr>
      <tr><td><code>cal</code></td><td>ASCII calendar for any month/year</td><td><code>cal 12 2026</code></td></tr>
      <tr><td><code>yes</code></td><td>Output repeated string (capped at 50)</td><td><code>yes test</code></td></tr>
      <tr><td><code>seq</code></td><td>Generate number sequence</td><td><code>seq 1 5</code></td></tr>
      <tr><td><code>base64</code></td><td>Base64 encode/decode</td><td><code>base64 -d aGVsbG8=</code></td></tr>
      <tr><td><code>printf</code></td><td>Formatted print (%s, %d, %f)</td><td><code>printf "hello %s" world</code></td></tr>
      <tr><td><code>cut</code></td><td>Extract column from file</td><td><code>cut -f2 -d, data.csv</code></td></tr>
      <tr><td><code>uniq</code></td><td>Filter adjacent duplicates</td><td><code>uniq lines.txt</code></td></tr>
      <tr><td><code>hostname</code></td><td>Show host/platform info</td><td><code>hostname</code></td></tr>
      <tr><td><code>whoami</code></td><td>Show current user</td><td><code>whoami</code></td></tr>
      <tr><td><code>basename</code></td><td>Strip directory from path</td><td><code>basename /a/b/c.txt</code></td></tr>
      <tr><td><code>dirname</code></td><td>Strip filename from path</td><td><code>dirname /a/b/c.txt</code></td></tr>
      <tr><td><code>sleep</code></td><td>Countdown delay (1-30s)</td><td><code>sleep 3</code></td></tr>
      <tr><td><code>expand</code></td><td>Convert tabs to spaces</td><td><code>expand code.txt</code></td></tr>
    </table></div>
    <p>All file-reading commands (<code>cut</code>, <code>uniq</code>, <code>expand</code>) work with shell pipes: <code>cat data.csv | cut -f2 -d, | uniq</code>.</p>
  </section>

  <!-- ── Floating ── -->
  <section id="floating">
    <h2>🪟 Floating UI Elements</h2>
    <div class="callout callout-success">
      <span class="callout-title">Buttons, Menus &amp; Panels</span>
      Create persistent floating UI elements that survive page reload — buttons that run commands, collapsible menus with sub-buttons, and informational panels.
    </div>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th><th>Example</th></tr>
      <tr><td><code>floating-add</code></td><td>Add a floating element (btn, menu, or panel)</td><td><code>floating-add btn quick-status ls -la</code></td></tr>
      <tr><td><code>floating-remove</code></td><td>Remove a floating element</td><td><code>floating-remove quick-status</code></td></tr>
      <tr><td><code>floating-list</code></td><td>List all floating elements</td><td><code>floating-list</code></td></tr>
      <tr><td><code>floating-pos</code></td><td>Reposition an element (x y in px, or auto)</td><td><code>floating-pos menu1 100 200</code></td></tr>
      <tr><td><code>floating-clear</code></td><td>Remove all floating elements</td><td><code>floating-clear</code></td></tr>
      <tr><td><code>floating-toggle</code></td><td>Show/hide a floating element</td><td><code>floating-toggle menu1</code></td></tr>
    </table></div>
    <h3>Usage Examples</h3>
    <pre><span class="cmt"># Simple button — click to run a command</span>
floating-add btn quick ls -la

<span class="cmt"># Menu with sub-buttons (btn:Label:command)</span>
floating-add menu tools Tools btn:Status:status btn:Help:help btn:Check:health-check

<span class="cmt"># Panel with info text</span>
floating-add panel info "Server: production | Uptime: 12d"

<span class="cmt"># You can drag buttons and menu headers to reposition them</span>
<span class="cmt"># Position persists across page reloads</span></pre>
  </section>

  <!-- ── Runtime Debug /sys/ ── -->
  <section id="runtime-debug">
    <h2>🔍 Runtime Debug — /sys/</h2>
    <div class="callout callout-success">
      <span class="callout-title">Virtual /sys/ filesystem</span>
      Live runtime state mounted as browsable VFS files. Cat, grep, tree, find all work — no special commands needed. Never persisted to localStorage.
    </div>
    <h3>Path Reference</h3>
    <pre><span class="cmt"># Overview</span>
cat /sys/info

<span class="cmt"># Memory</span>
cat /sys/heap/stats
cat /sys/heap/breakdown

<span class="cmt"># AI Internal Logs</span>
cat /sys/logs/tool-calls
cat /sys/logs/errors
cat /sys/logs/commands

<span class="cmt"># VFS Stats</span>
cat /sys/vfs/stats
cat /sys/vfs/largest

<span class="cmt"># Module Info</span>
ls /sys/modules/
cat /sys/modules/calc/info

<span class="cmt"># DOM / Config</span>
cat /sys/dom/node-count
cat /sys/config/ai
cat /sys/config/version</pre>
    <p>Also available: <code>mem-debug</code> (one-shot text output), <code>reset-mem</code> (clear AI internal logs without touching VFS or config), and the <strong>DebugSupervisorModule</strong> (<code>debug-stats</code>, <code>debug-history</code>, <code>debug-analyze</code>, <code>debug-trends</code>, <code>debug-fix</code>, <code>debug-health</code>) for persistent error tracking and root-cause analysis.</p>
  </section>

  <!-- ── Shell ── -->
  <section id="shell">
    <h2>🐚 Shell</h2>
    <div class="callout callout-success">
      <span class="callout-title">Pipes · Redirects · Variables · Scripts</span>
      The shell module sits on top of every command — pipes, redirections, variable substitution, command chaining, and VFS script execution work automatically without any prefix.
    </div>

    <h3>Pipes <code>|</code></h3>
    <p>Chain commands by piping stdout to the next command's stdin. Pipe-aware commands (<code>grep</code>, <code>head</code>, <code>tail</code>, <code>sort</code>, <code>wc</code>, <code>cut</code>, <code>uniq</code>, <code>expand</code>) auto-read from pipe when no file argument is given.</p>
    <pre><span class="cmt"># Filter file listing</span>
ls | grep .md

<span class="cmt"># Count lines matching pattern</span>
cat notes.txt | grep error | wc

<span class="cmt"># Pipeline: filter → sort → head</span>
cat data.csv | grep 2026 | sort | head -5</pre>

    <h3>Redirects <code>&gt;</code> <code>&gt;&gt;</code> <code>&lt;</code></h3>
    <pre><span class="cmt"># Write output to file</span>
cal &gt; /tmp/calendar.txt

<span class="cmt"># Append to file</span>
echo "new line" &gt;&gt; log.txt

<span class="cmt"># Read file as stdin</span>
grep error &lt; log.txt</pre>

    <h3>Command Chaining</h3>
    <pre><span class="cmt"># AND: next runs only if previous succeeds</span>
touch test.txt &amp;&amp; echo "created"

<span class="cmt"># OR: next runs only if previous fails</span>
rm nonexistent || echo "failed"

<span class="cmt"># Sequence: runs in order regardless</span>
cd /skills; ls</pre>

    <h3>Variables</h3>
    <pre><span class="cmt"># Set a variable</span>
export GREET=hello

<span class="cmt"># Reference in any command</span>
echo $GREET

<span class="cmt"># List all vars</span>
set

<span class="cmt"># Remove a var</span>
unset GREET</pre>

    <h3>Scripts</h3>
    <p>VFS files with <code>.sh</code> extension can be executed line by line. Variables persist across lines.</p>
    <pre><span class="cmt"># Create a script in VFS</span>
echo 'export NAME=WebX11' &gt; greet.sh
echo 'echo "Hello, $NAME!"' &gt;&gt; greet.sh

<span class="cmt"># Run it</span>
script greet.sh
sh greet.sh</pre>

    <h3>Shell Commands</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>export &lt;var&gt;=&lt;val&gt;</code></td><td>Set a shell variable</td></tr>
      <tr><td><code>unset &lt;var&gt;</code></td><td>Remove a shell variable</td></tr>
      <tr><td><code>set</code></td><td>List all shell variables</td></tr>
      <tr><td><code>script &lt;path.sh&gt;</code></td><td>Run a VFS script file</td></tr>
      <tr><td><code>sh &lt;path.sh&gt;</code></td><td>Alias for <code>script</code> — run a VFS script file</td></tr>
      <tr><td><code>alias [name=value]</code></td><td>List aliases or set a custom alias name=command</td></tr>
      <tr><td><code>unalias &lt;name&gt;</code></td><td>Remove a custom alias</td></tr>
          <tr><td><code>h</code> · <code>s</code> · <code>ll</code></td><td>Short aliases: <code>h</code> = help, <code>s</code> = web search, <code>ll</code> = detailed listing</td></tr>
      <tr><td><code>dashboard [--watch|--stop]</code></td><td>Collect live telemetry and open the dashboard page; --watch re-collects every 5 s</td></tr>
      <tr><td><code>cost [on|off]</code></td><td>Retail prices per model, today's anonymous free-message allowance and this session's token spend; <code>on</code>/<code>off</code> toggles a per-reply cost line (<code>usage</code> is an alias)</td></tr>
      <tr><td><code>usage [--json] [--reset]</code></td><td>LLM token usage report for this browser (per model, cost estimate)</td></tr>
      <tr><td><code>df</code></td><td>Virtual filesystem usage</td></tr>
      <tr><td><code>free</code></td><td>JS heap / memory snapshot</td></tr>
      <tr><td><code>top</code></td><td>Busiest commands and modules by activity</td></tr>
      <tr><td><code>ps</code></td><td>Commands and follows currently running</td></tr>
      <tr><td><code>history [--search &lt;term&gt;]</code></td><td>Command history, optionally filtered</td></tr>
      <tr><td><code>run &lt;script&gt;</code></td><td>Execute a saved script from the VFS</td></tr>
      <tr><td><code>sysmsg [on|off]</code></td><td>Toggle system messages</td></tr>
      <tr><td><code>view_module &lt;name&gt;</code></td><td>Print a module's source</td></tr>
      <tr><td><code>node &lt;script.js&gt;</code></td><td>Run a JS file from the VFS (alias of <code>js-run</code>)</td></tr>
</table></div>
  </section>

  <!-- ── Floating UI ── -->
  <section id="floating">
    <h2>🪄 Floating UI</h2>
    <div class="callout callout-success">
      <span class="callout-title">Remixable floating buttons · Menus · Panels</span>
      The Floating Module lets you or the AI spawn persistent floating UI elements that survive page reloads. All state is kept in localStorage.
    </div>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>floating-add btn &lt;id&gt; &lt;label&gt; &lt;command&gt;</code></td><td>Spawn a floating button that runs a terminal command</td></tr>
      <tr><td><code>floating-add menu &lt;id&gt; &lt;label&gt; btn:Sub|cmd ...</code></td><td>Spawn a collapsible floating menu with sub-buttons</td></tr>
      <tr><td><code>floating-add panel &lt;id&gt; &lt;title&gt; &lt;content&gt;</code></td><td>Spawn a floating text panel</td></tr>
      <tr><td><code>floating-remove &lt;id&gt;</code></td><td>Remove a floating element</td></tr>
      <tr><td><code>floating-list</code></td><td>Show all floating elements with IDs and positions</td></tr>
      <tr><td><code>floating-pos &lt;id&gt; &lt;x|auto&gt; &lt;y|auto&gt;</code></td><td>Reposition a floating element</td></tr>
      <tr><td><code>floating-toggle &lt;id&gt;</code></td><td>Show/hide a floating element</td></tr>
      <tr><td><code>floating-clear</code></td><td>Remove all floating elements</td></tr>
    </table></div>
    <pre><span class="cmt"># Create a button</span>
floating-add btn files "📁 Files" ls

<span class="cmt"># Create a collapsible menu</span>
floating-add menu tools "🔧 Tools" btn:Help|help btn:Clear|clear

<span class="cmt"># Create a status panel</span>
floating-add panel status "📊 Status" "Ready"

<span class="cmt"># List all elements</span>
floating-list

<span class="cmt"># Hide without removing</span>
floating-toggle files</pre>
  </section>

  <!-- ── Security ── -->
  <section id="security">
    <h2>🔒 Security & Guardrails</h2>
    <div class="callout callout-warning">
      <span class="callout-title">Protecting Your Terminal</span>
      Three layered protections — guardrails block dangerous patterns, confidence escalation requires AI to self-assess, shadow VFS previews filesystem impact.
    </div>

    <h3>Guardrail Policy</h3>
    <p>Pre-execution guardrails intercept AI tool calls and block or warn on patterns matching dangerous operations:</p>
    <div class="table-wrap"><table>
      <tr><th>Rule</th><th>Description</th><th>Severity</th></tr>
      <tr><td><code>rm-rf-block</code></td><td>Prevent recursive force deletes</td><td>🔴 deny</td></tr>
      <tr><td><code>curl-pipe-bash</code></td><td>Block curl-to-bash execution</td><td>🔴 deny</td></tr>
      <tr><td><code>rm-outer-vfs</code></td><td>Block deletion of sensitive metadata files</td><td>🔴 deny</td></tr>
      <tr><td><code>mass-delete</code></td><td>Block mass-delete operations</td><td>🔴 deny</td></tr>
      <tr><td><code>chmod-777</code></td><td>Block world-writable permissions</td><td>🔴 deny</td></tr>
      <tr><td><code>eval-danger</code></td><td>Block dynamic code execution (eval/exec/system)</td><td>🔴 deny</td></tr>
      <tr><td><code>external-dl</code></td><td>External file download warning</td><td>🟡 warn</td></tr>
      <tr><td><code>env-overwrite</code></td><td>Modifying environment variables</td><td>🟡 warn</td></tr>
    </table></div>

    <h3>Commands</h3>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>guardrail</code></td><td>Show guardrail policy rules and violation count</td></tr>
      <tr><td><code>guardrail-add &lt;id&gt; &lt;severity&gt; &lt;pattern&gt; &lt;tools...&gt;</code></td><td>Add a custom guardrail rule (severity: deny/warn)</td></tr>
      <tr><td><code>guardrail-remove &lt;id&gt;</code></td><td>Remove a guardrail rule</td></tr>
      <tr><td><code>shadow &lt;command&gt;</code></td><td>Execute command in Shadow VFS — snapshot, run, diff changes</td></tr>
      <tr><td><code>shadow-commit</code></td><td>Accept shadow VFS changes</td></tr>
      <tr><td><code>shadow-rollback</code></td><td>Undo shadow VFS changes</td></tr>
    </table></div>

    <h3>Confidence Escalation</h3>
    <p>When the AI requests destructive actions, it must declare <code>Confidence: N%</code> in its reasoning. Below 90%, manual approval is required. If no confidence is declared, manual approval is required by default. This prevents the AI from making low-confidence destructive changes.</p>
  </section>

  <!-- ── Sessions ── -->
  <section id="sessions">
    <h2>💬 Sessions</h2>
    <p>Sessions persist AI conversation logs in VFS <code>/memory/</code>. The AI auto-loads recent sessions at start for continuity.</p>
    <h3>AI Tools</h3>
    <div class="table-wrap"><table>
      <tr><th>Tool</th><th>Description</th></tr>
      <tr><td><code>session_save</code></td><td>Save summary</td></tr>
      <tr><td><code>session_load</code></td><td>Load by date</td></tr>
      <tr><td><code>session_recent</code></td><td>Show last N</td></tr>
      <tr><td><code>session_stats</code></td><td>Aggregate statistics</td></tr>
          <tr><td><code>session-new</code></td><td>Start a fresh AI session (clears context, keeps history)</td></tr>
</table></div>
    <p>The terminal auto-saves session state every 60s and auto-restores on page reload.</p>
  </section>

  <!-- ── Storage ── -->
  <section id="storage">
    <h2>💾 Storage</h2>
    <div class="callout callout-success">
      <span class="callout-title">localStorage Persistence</span>
      Everything survives hard refreshes via 15+ localStorage keys.
    </div>
    <pre><span class="cmt"># Clear all WebX11 data</span>
localStorage.clear()
location.reload()

<span class="cmt"># Back up / restore VFS</span>
vfs-export
vfs-import</pre>
    <p>~5–10MB per domain. Only URLs (not code) are stored for modules.</p>
  </section>

  <!-- ── WebDAV ── -->
  <section id="webdav">
    <h2>☁️ WebDAV</h2>
    <p>Cloud sync with your WebX11 space. File-tree browser UI with bulk actions.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>webdav-config &lt;url&gt; &lt;token&gt;</code></td><td>Configure WebDAV connection</td></tr>
      <tr><td><code>webdav-status</code></td><td>Show sync status and connection health</td></tr>
      <tr><td><code>webdav-ls [path]</code></td><td>List remote files</td></tr>
      <tr><td><code>webdav-push &lt;local&gt; [remote]</code></td><td>Upload file to cloud</td></tr>
      <tr><td><code>webdav-pull &lt;remote&gt; [local]</code></td><td>Download file from cloud</td></tr>
      <tr><td><code>webdav-browser</code></td><td>Open file-tree browser UI with checkboxes, context menu, inline rename, per-file preview 👁 / open-in-new-tab ⛶ buttons, minimize-to-floating and share-URL header buttons</td></tr>
      <tr><td><code>webdav-rm &lt;path&gt;</code></td><td>Delete remote file/directory</td></tr>
      <tr><td><code>webdav-mkdir &lt;path&gt;</code></td><td>Create remote directory</td></tr>
      <tr><td><code>webdav-rename &lt;old&gt; &lt;new&gt;</code></td><td>Rename remote file</td></tr>
      <tr><td><code>webdav-move &lt;src&gt; &lt;dst&gt;</code></td><td>Move remote file (alias for rename)</td></tr>
      <tr><td><code>webdav-backup</code></td><td>Backup entire space</td></tr>
          <tr><td><code>webdav-login &lt;user&gt;</code></td><td>Store WebDAV credentials for this session</td></tr>
</table></div>
    <h3>Browser Features</h3>
    <ul>
      <li>Checkbox select + Select All toggle</li>
      <li>Bulk action bar: Delete, Move, Download selected files</li>
      <li>Inline rename: double-click filename</li>
      <li>Right-click context menu with all operations</li>
      <li>Breadcrumb navigation</li>
      <li>Create-directory button</li>
      <li>Keyboard shortcuts: <code>j</code>/<code>k</code> navigate, <code>Space</code> select, <code>Enter</code> open</li>
    </ul>
  </section>

  <!-- ── Agents ── -->
  <section id="agents">
    <h2>🤖 Agent Orchestration</h2>
    <p>Register, list, and delegate tasks to AI agents with lease-based lifecycle management.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>agent-list</code></td><td>List all registered agents with status</td></tr>
      <tr><td><code>agent-status &lt;id&gt;</code></td><td>Show detailed status for a specific agent</td></tr>
      <tr><td><code>agent-register &lt;name&gt; &lt;model&gt;</code></td><td>Register a new AI agent</td></tr>
      <tr><td><code>agent-unregister &lt;id&gt;</code></td><td>Remove an agent from the registry</td></tr>
      <tr><td><code>lease-list</code></td><td>Show active leases — agent tasks with status and TTL</td></tr>
      <tr><td><code>orchestrate &lt;task&gt;</code></td><td>Delegate multi-step task to agent orchestrator</td></tr>
      <tr><td><code>orchestrate-parallel &lt;task&gt;</code></td><td>Decompose and run sub-tasks in parallel (auto-splits on "and"/"then")</td></tr>
      <tr><td><code>orchestrate-decompose &lt;task&gt;</code></td><td>Preview how a task would be split into sub-tasks</td></tr>
      <tr><td><code>orchestrate-result</code></td><td>Show results of the last parallel batch</td></tr>
      <tr><td><code>orchestrator-status</code></td><td>Show orchestrator agent pool status</td></tr>
      <tr><td><code>orchestrator-list</code></td><td>List all spawned agents with full details</td></tr>
      <tr><td><code>orchestrator-spawn &lt;role&gt; [caps...]</code></td><td>Spawn a new worker agent</td></tr>
      <tr><td><code>orchestrator-sleep &lt;id&gt;</code></td><td>Suspend agent to VFS (survives reload)</td></tr>
      <tr><td><code>orchestrator-wake &lt;id&gt;</code></td><td>Restore agent from VFS sleep state</td></tr>
      <tr><td><code>orchestrator-kill &lt;id&gt;</code></td><td>Terminate an agent and revoke leases</td></tr>
      <tr><td><code>orchestrator-purge</code></td><td>Remove dead agents (&gt;60s silent)</td></tr>
      <tr><td><code>orchestrator-config &lt;key&gt; &lt;value&gt;</code></td><td>Tune: spawn-limit, spawn-strategy, heartbeat-timeout, idle-timeout, restart-policy, a2a-polling (on/off), a2a-poll-interval, heartbeat-check, idle-sweep-interval, dead-purge-timeout, consensus-size, consensus-strategy, consensus-timeout, pipeline-auto-fix, pipeline-stage-timeout (persisted)</td></tr>
      <tr><td><code>orchestrator-restart-policy &lt;id&gt; &lt;policy&gt;</code></td><td>Set per-agent restart policy: on-failure, always, never</td></tr>
      <tr><td><code>consensus &lt;question&gt;</code></td><td>Consensus: spawn N agents, debate, resolve by majority vote</td></tr>
      <tr><td><code>consensus-status</code></td><td>Show current/active consensus round status</td></tr>
      <tr><td><code>consensus-history</code></td><td>Show past consensus rounds and resolutions</td></tr>
      <tr><td><code>pipeline &lt;test|deploy|verify|history|config&gt;</code></td><td>Autonomous CI/CD: test agents/modules, deploy (test→auto-fix→verify), history, config</td></tr>
      <tr><td><code>lease-create &lt;agent-id&gt; [duration] [task]</code></td><td>Create a time-bound lease for a worker agent</td></tr>
      <tr><td><code>lease-list</code></td><td>Show active leases — agent tasks with status and TTL</td></tr>
      <tr><td><code>lease-revoke &lt;id&gt;</code></td><td>Revoke an active lease</td></tr>
      <tr><td><code>lease-renew &lt;id&gt; &lt;seconds&gt;</code></td><td>Extend an active lease by N seconds</td></tr>
          <tr><td><code>orchestrator-schedule &lt;role&gt; &lt;interval_s&gt; &lt;task...&gt;</code></td><td>Schedule a recurring task for a role</td></tr>
      <tr><td><code>orchestrator-schedules</code></td><td>List scheduled tasks</td></tr>
      <tr><td><code>orchestrator-unschedule &lt;id&gt;</code></td><td>Remove a scheduled task</td></tr>
</table></div>
  </section>

  <!-- ── A2A Contracts ── -->
  <section id="a2a-contracts">
    <h2>📜 A2A Contracts</h2>
    <p>Define and enforce agent-to-agent contracts with input/output schema validation. Contracts are stored in <code>/.contracts/</code> and validated during orchestrator delegation.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>a2a-send &lt;agent-id&gt; &lt;json&gt;</code></td><td>Send an A2A message to an agent's VFS inbox</td></tr>
      <tr><td><code>a2a-list</code></td><td>Show all A2A messages with pending status</td></tr>
      <tr><td><code>contract-register &lt;role&gt; [fields...] --output [fields...]</code></td><td>Register a contract with input/output schema</td></tr>
      <tr><td><code>contract-list</code></td><td>List all registered contracts</td></tr>
          <tr><td><code>a2a-post &lt;to&gt; &lt;type&gt; &lt;capability&gt; &lt;payload&gt;</code></td><td>Post a message to another agent's mailbox</td></tr>
      <tr><td><code>a2a-poll</code></td><td>Read your own inbox</td></tr>
      <tr><td><code>a2a-ack &lt;id&gt;</code></td><td>Acknowledge a message</td></tr>
      <tr><td><code>a2a-reject &lt;id&gt;</code></td><td>Reject a message</td></tr>
      <tr><td><code>a2a-status</code></td><td>Mailbox counters per agent</td></tr>
      <tr><td><code>a2a-prune</code></td><td>Drop old and acknowledged messages</td></tr>
</table></div>
  </section>

  <!-- ── Neural VFS ── -->
  <section id="neural-vfs">
    <h2>🧠 Neural VFS</h2>
    <p>Semantic concept-indexing layer over the hierarchical VFS. Scans files and builds a concept → path mapping using filenames, tags, and headers.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>memgraph-status</code></td><td>Memory graph node/edge counts</td></tr>
      <tr><td><code>memgraph-search &lt;q&gt;</code></td><td>Find nodes by label or type</td></tr>
      <tr><td><code>memgraph-stats</code></td><td>Most connected nodes, strongest edges</td></tr>
      <tr><td><code>memgraph-export</code></td><td>Export graph as JSON</td></tr>
      <tr><td><code>memgraph-prune</code></td><td>Remove stale low-weight edges</td></tr>
      <tr><td><code>nvfs-status</code></td><td>Show index stats and last scan time</td></tr>
      <tr><td><code>nvfs-resolve &lt;concept&gt;</code></td><td>Find files related to a concept (exact + fuzzy)</td></tr>
      <tr><td><code>nvfs-tree [concept]</code></td><td>Show concept-to-file mapping tree</td></tr>
<tr><td><code>nvfs-config [key] [value]</code></td><td>View/set config (fuzzy-limit, tree-files, tree-concepts, resolve-files, deep-index, deep-model)</td></tr>
      <tr><td><code>nvfs-alias list|add|remove|clear</code></td><td>Manage concept aliases</td></tr>
      <tr><td><code>nvfs-sync [--deep]</code></td><td>Incremental background sync dirty files</td></tr>
      <tr><td><code>nvfs-save</code></td><td>Force-save semantic index to VFS disk</td></tr>
      <tr><td><code>nvfs-cancel</code></td><td>Cancel running index operation</td></tr>
          <tr><td><code>nvfs-index-graph [--deep]</code></td><td>Build the NVFS index dependency graph</td></tr>
</table></div>
  </section>

  <!-- ── Server Monitor ── -->
  <section id="server-monitor">
    <h2>📊 Server Monitor</h2>
    <p>Uptime monitoring for external services + self-optimization telemetry tracking tool latency and error rates.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>server &lt;name&gt; &lt;url&gt;</code></td><td>Add a server to monitor</td></tr>
      <tr><td><code>servers</code></td><td>List all monitored servers</td></tr>
      <tr><td><code>server-check &lt;name&gt;</code></td><td>Check a server's current status</td></tr>
      <tr><td><code>monitor</code></td><td>Toggle auto-monitoring (60s interval)</td></tr>
<tr><td><code>system-health</code></td><td>Tool latency, VFS stats, modules, memory, error rates</td></tr>
      <tr><td><code>predict &lt;task&gt;</code></td><td>Predict task duration, tool turns, and confidence</td></tr>
      <tr><td><code>predictor-status</code></td><td>Prediction model accuracy and data points</td></tr>
      <tr><td><code>predictor-config &lt;k&gt; &lt;v&gt;</code></td><td>Tune confidence-threshold, min-data-points</td></tr>
    </table></div>
  </section>
  <section id="debug-panel">
    <h2>🔧 Debug Panel</h2>
    <p>Toggle the debug overlay to monitor system internals in real-time.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>debug</code></td><td>Toggle debug panel on/off</td></tr>
          <tr><td><code>debug-sync</code></td><td>Push debug records to the configured sync endpoint</td></tr>
      <tr><td><code>debug-sync-url &lt;url&gt;</code></td><td>Show or set the sync endpoint</td></tr>
      <tr><td><code>feedback &lt;message&gt;</code></td><td>Send feedback to the WebX11 maintenance agent (appears in its next triage run)</td><td><code>feedback download link 403s on mobile</code></td></tr>
      <tr><td><code>feedback-inbox</code></td><td>Read replies from the maintenance agent (requires an admin session)</td><td><code>feedback-inbox</code></td></tr>
</table></div>
    <h3>Debug Panel Shows</h3>
    <ul>
      <li><strong>Memory</strong> — localStorage usage, VFS size, session context size</li>
      <li><strong>Events</strong> — registered event listeners, module event bindings</li>
      <li><strong>Errors</strong> — recent JS errors with stack traces</li>
      <li><strong>Modules</strong> — loaded count, broken references, cache state</li>
    </ul>
    <p>Useful for troubleshooting module load failures, VFS corruption, and AI context bloat.</p>
  </section>

  <!-- ── Sandbox ── -->
  <section id="sandbox">
    <h2>🧪 Sandboxed Execution</h2>
    <p>WebWorkers provide isolated contexts for task execution. Each worker gets a VFS snapshot so operations don't interfere with the main terminal.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>sandbox-status</code></td><td>Show worker pool health and task metrics</td></tr>
      <tr><td><code>sandbox-config &lt;k&gt; &lt;v&gt;</code></td><td>Configure max-workers, min-workers</td></tr>
      <tr><td><code>sandbox-run &lt;task&gt;</code></td><td>Execute a task in the sandbox pool</td></tr>
    </table></div>
    <p><code>orchestrate --sandboxed &lt;task&gt;</code> routes delegation through the sandbox for full isolation.</p>
  </section>

  <!-- ── Memory Graph ── -->
  <section id="memory-graph">
    <h2>🧠 Memory Graph</h2>
    <p>Cross-session persistent graph database tracking files, concepts, tasks, and tools. Nodes store metadata, edges record relationships with weighted strength. Survives page reloads via VFS persistence.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>memgraph-status</code></td><td>Show node/edge counts and graph health</td></tr>
      <tr><td><code>memgraph-search &lt;q&gt;</code></td><td>Find nodes by label, type, or id</td></tr>
      <tr><td><code>memgraph-stats</code></td><td>Most connected nodes and strongest edges</td></tr>
      <tr><td><code>memgraph-export</code></td><td>Export full graph as JSON to VFS</td></tr>
<tr><td><code>memgraph-prune</code></td><td>Remove stale low-weight edges (&gt;30d, &lt;3 uses)</td></tr>
      <tr><td><code>memgraph-learn &lt;entity&gt; &lt;fact&gt;</code></td><td>Add a fact to the memory graph</td></tr>
          <tr><td><code>memgraph-agent &lt;agentId&gt;</code></td><td>Show one agent's memory subgraph</td></tr>
      <tr><td><code>memgraph-session [YYYY-MM-DD]</code></td><td>Show a day's session graph</td></tr>
      <tr><td><code>memgraph-decay-config &lt;days&gt; &lt;min_uses&gt;</code></td><td>Tune memory decay</td></tr>
</table></div>
    <p>Context is automatically injected into AI prompts for cross-session awareness.</p>
  </section>

  <!-- ── World Model ── -->
  <section id="world-model">
    <h2>🌐 World Model</h2>
    <p>System self-awareness engine. Synthesizes data from memory graph, module system, skills index, telemetry, and agent pool into a unified model at <code>/system/world-model.json</code>. Auto-refreshes every 5 minutes.</p>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>world-model</code></td><td>Show full world model breakdown</td></tr>
      <tr><td><code>world-model-summary</code></td><td>One-line system status summary</td></tr>
      <tr><td><code>world-model-ask &lt;q&gt;</code></td><td>Query modules, skills, agents, health, or changes</td></tr>
      <tr><td><code>world-model-refresh</code></td><td>Force re-synthesis immediately</td></tr>
      <tr><td><code>world-model-config &lt;k&gt; &lt;v&gt;</code></td><td>Tune refresh-interval and max-projects</td></tr>
    </table></div>
  </section>

  <!-- ── Security ── -->
  <section id="security">
    <h2>🔒 Security</h2>
    <div class="table-wrap"><table>
      <tr><th>Feature</th><th>Status</th></tr>
      <tr><td>Input Validation</td><td>✅</td></tr>
      <tr><td>Output Escaping</td><td>✅</td></tr>
      <tr><td>No eval() on User Input</td><td>✅</td></tr>
      <tr><td>Path Traversal Prevention</td><td>✅</td></tr>
      <tr><td>Sandboxed File System</td><td>✅</td></tr>
      <tr><td>AI Destructive Confirmations</td><td>✅ Required + 120s countdown</td></tr>
      <tr><td>Iframe Preview Sandbox</td><td>✅ allow-same-origin allow-scripts</td></tr>
    </table></div>
    <h3>Security Levels</h3>
    <div class="table-wrap"><table>
      <tr><th>Level</th><th>Behavior</th></tr>
      <tr><td><code>0</code></td><td>Unrestricted — all commands allowed without confirmation</td></tr>
      <tr><td><code>1</code> (default)</td><td>Confirm destructive actions (rm, overwrite, etc.)</td></tr>
      <tr><td><code>2</code></td><td>Deny sensitive commands (rm -rf, encrypt operations)</td></tr>
      <tr><td><code>3</code></td><td>Deny all dangerous commands (requires deliberate override)</td></tr>
    </table></div>
    <div class="table-wrap"><table>
      <tr><th>Command</th><th>Description</th></tr>
      <tr><td><code>security-level &lt;0-3&gt;</code></td><td>Set active security level</td></tr>
      <tr><td><code>security</code></td><td>Show full status: level, blocked count, destructive/system/whitelist sets, suspicious flags, registered commands</td></tr>
      <tr><td><code>security-destructive list</code></td><td>Show destructive command set</td></tr>
      <tr><td><code>security-destructive add|remove &lt;cmd&gt;</code></td><td>Add/remove command from destructive set (persisted)</td></tr>
      <tr><td><code>security-system list</code></td><td>Show system command set</td></tr>
      <tr><td><code>security-system add|remove &lt;cmd&gt;</code></td><td>Add/remove command from system set (persisted)</td></tr>
      <tr><td><code>security-whitelist list</code></td><td>Show whitelist command set</td></tr>
      <tr><td><code>security-whitelist add|remove &lt;cmd&gt;</code></td><td>Add/remove command from whitelist (persisted)</td></tr>
      <tr><td><code>security-flag list</code></td><td>Show suspicious flags</td></tr>
      <tr><td><code>security-flag add|remove &lt;flag&gt;</code></td><td>Add/remove suspicious flag (persisted, -- prefix optional)</td></tr>
      <tr><td><code>cmd-allow &lt;command&gt;</code></td><td>Add command to allowlist (bypasses restrictions)</td></tr>
      <tr><td><code>cmd-deny &lt;command&gt;</code></td><td>Add command to denylist (always blocked)</td></tr>
    </table></div>
    <div class="callout callout-warning">
      <span class="callout-title">⚠️ Module Loading</span>
      Only load modules from trusted sources — they have full terminal access.
    </div>
  </section>

  <!-- ── Troubleshooting ── -->
  <section id="trouble">
    <h2>🔧 Troubleshooting</h2>
    <div class="table-wrap"><table>
      <tr><th>Issue</th><th>Solution</th></tr>
      <tr><td>AI not responding</td><td>Run <code>ollamaconnect</code> first, ensure Ollama is running</td></tr>
      <tr><td>Voice not working</td><td>Chrome/Edge/Safari only. Grant mic permission</td></tr>
      <tr><td>Module fails to load</td><td>Check CORS on the hosting server</td></tr>
      <tr><td>Data lost after refresh</td><td>Check localStorage is enabled. Private mode clears data</td></tr>
      <tr><td>AI actions not confirming</td><td>Confirm bar auto-denies after 120s. Type <code>ai-allow</code></td></tr>
      <tr><td>Sound not playing</td><td>Browser may need first user gesture. Toggle off/on</td></tr>
      <tr><td>Ollama CORS error</td><td><code>OLLAMA_ORIGINS="*" ollama serve</code></td></tr>
    </table></div>
    <h3>Debug</h3>
    <pre><span class="cmt"># Console</span>
F12 → Console

<span class="cmt"># View AI state</span>
ai-system
ai-context

<span class="cmt"># Module status</span>
listmods</pre>
  </section>

  <!-- ── Quick Ref ── -->
  <section id="ref">
    <h2>⚡ Quick Reference</h2>
    <div class="quick-ref">
      <div class="quick-ref-title">WebX11 v4.5.11</div>
      <div class="quick-ref-grid">
        <div class="quick-ref-item"><span class="cmd">help</span><span class="desc">Show all commands</span></div>
        <div class="quick-ref-item"><span class="cmd">cls</span><span class="desc">Clear terminal</span></div>
        <div class="quick-ref-item"><span class="cmd">ll</span><span class="desc">List files</span></div>
        <div class="quick-ref-item"><span class="cmd">cd &lt;dir&gt;</span><span class="desc">Change directory</span></div>
        <div class="quick-ref-item"><span class="cmd">cat &lt;f&gt;</span><span class="desc">View file</span></div>
        <div class="quick-ref-item"><span class="cmd">edit &lt;f&gt;</span><span class="desc">Edit file</span></div>
        <div class="quick-ref-item"><span class="cmd">ai &lt;msg&gt;</span><span class="desc">Chat with AI</span></div>
        <div class="quick-ref-item"><span class="cmd">search &lt;q&gt;</span><span class="desc">Web search</span></div>
        <div class="quick-ref-item"><span class="cmd">find &lt;q&gt;</span><span class="desc">File search</span></div>
        <div class="quick-ref-item"><span class="cmd">diff a b</span><span class="desc">Compare files</span></div>
        <div class="quick-ref-item"><span class="cmd">ollamaconnect</span><span class="desc">Connect AI</span></div>
        <div class="quick-ref-item"><span class="cmd">ai-allow</span><span class="desc">Allow destructive</span></div>
        <div class="quick-ref-item"><span class="cmd">ai-deny</span><span class="desc">Deny destructive</span></div>
        <div class="quick-ref-item"><span class="cmd">modules</span><span class="desc">Module Manager</span></div>
        <div class="quick-ref-item"><span class="cmd">skill-list</span><span class="desc">List skills</span></div>
        <div class="quick-ref-item"><span class="cmd">alias</span><span class="desc">List aliases</span></div>
        <div class="quick-ref-item"><span class="cmd">preview</span><span class="desc">HTML preview</span></div>
        <div class="quick-ref-item"><span class="cmd">upload</span><span class="desc">Upload file</span></div>
        <div class="quick-ref-item"><span class="cmd">&#124; pipe</span><span class="desc">Chain commands</span></div>
        <div class="quick-ref-item"><span class="cmd">&gt; file</span><span class="desc">Redirect output</span></div>
        <div class="quick-ref-item"><span class="cmd">which</span><span class="desc">Locate command</span></div>
        <div class="quick-ref-item"><span class="cmd">env</span><span class="desc">Show env vars</span></div>
        <div class="quick-ref-item"><span class="cmd">script</span><span class="desc">Run .sh file</span></div>
        <div class="quick-ref-item"><span class="cmd">date</span><span class="desc">Show time</span></div>
        <div class="quick-ref-item"><span class="cmd">cal</span><span class="desc">Show calendar</span></div>
        <div class="quick-ref-item"><span class="cmd">base64</span><span class="desc">Encode/decode</span></div>
        <div class="quick-ref-item"><span class="cmd">nvfs-index</span><span class="desc">Build semantic index</span></div>
        <div class="quick-ref-item"><span class="cmd">nvfs-resolve</span><span class="desc">Find files by concept</span></div>
        <div class="quick-ref-item"><span class="cmd">nvfs-sync</span><span class="desc">Sync dirty files</span></div>
        <div class="quick-ref-item"><span class="cmd">nvfs-save</span><span class="desc">Save index to disk</span></div>
        <div class="quick-ref-item"><span class="cmd">nvfs-cancel</span><span class="desc">Cancel index op</span></div>
        <div class="quick-ref-item"><span class="cmd">js</span><span class="desc">Eval JS expression</span></div>
        <div class="quick-ref-item"><span class="cmd">js-run</span><span class="desc">Run JS file</span></div>
        <div class="quick-ref-item"><span class="cmd">vfs-size</span><span class="desc">VFS size report</span></div>
        <div class="quick-ref-item"><span class="cmd">vfs-clean</span><span class="desc">Nuke system dirs</span></div>
        <div class="quick-ref-item"><span class="cmd">mindmap svg</span><span class="desc">Render mindmap as SVG</span></div>
        <div class="quick-ref-item"><span class="cmd">gui</span><span class="desc">Simple GUI builder</span></div>
        <div class="quick-ref-item"><span class="cmd">contract-list</span><span class="desc">List A2A contracts</span></div>
        <div class="quick-ref-item"><span class="cmd">modules-list</span><span class="desc">List all 45 modules</span></div>
        <div class="quick-ref-item"><span class="cmd">orchestrate</span><span class="desc">Delegate to agent</span></div>
        <div class="quick-ref-item"><span class="cmd">system-health</span><span class="desc">System diagnostics</span></div>
        <div class="quick-ref-item"><span class="cmd">seq</span><span class="desc">Number sequence</span></div>
        <div class="quick-ref-item"><span class="cmd">whoami</span><span class="desc">Show user</span></div>
        <div class="quick-ref-item"><span class="cmd">basename</span><span class="desc">Strip dir path</span></div>
      </div>
    </div>
  </section>

  <div style="text-align:center;margin-bottom:32px;">
    <p>📄 One-page <a href="cheatsheet.html" style="color:var(--accent2);font-weight:600;">Quick Reference cheat sheet</a> — printable, dark mode, all commands.</p>
  </div>

  <!-- ── Changelog ── -->
  <section id="history">
    <h2>📋 Changelog</h2>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.91 — October 2026</span>
        <span class="v-date">context says what it dropped</span></div>
      <ul>
        <li><strong>The window warns before it forgets.</strong> At 80% of the token budget the
          terminal says so once — <code>⚠️ Context 90% full (900/1000 tokens)</code> — instead of
          only announcing the fall after compression. It does not repeat on every turn.</li>
        <li><strong>Trimming leaves a marker.</strong> Old turns used to vanish silently, so a long
          task "remembered" a conversation that never started that way. The window now opens with
          <code>[context trim: 6 earlier message(s) left this window — the earliest was: "turn 0
          original brief text…"]</code>.</li>
        <li><strong>The help text stopped lying.</strong> <code>max-context-tokens</code> claimed a
          default of 2000; the code has always used 12000.</li>
        <li><strong>On the "400k / 422k" report:</strong> no such limit exists in this codebase —
          the only budgets are <code>maxContextTokens</code> (12 000) and <code>maxContext × 2</code>
          messages. That figure came from outside the app; nothing here was changed to chase it.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.88–90 — October 2026</span>
        <span class="v-date">one phantom entry, three bugs</span></div>
      <ul>
        <li><strong>A directory listing invented a <code>sys</code> entry.</strong> <code>ls</code>
          injects the virtual <code>/sys</code> — but it tested the <em>argument</em> instead of the
          result, so after <code>cd _agents</code> the listing showed <code>sys</code> inside
          <code>_agents</code>, and a follow-up <code>list_files('_agents/sys')</code> failed with
          "Directory not found". The listing lied; the resolver was right. Injection now happens only
          for the root directory.</li>
        <li><strong><code>tree</code> crashed on the root listing.</strong> The same virtual entry was
          pushed into the walk and then dereferenced, throwing
          <code>Cannot read properties of undefined</code> mid-output — a partial tree, which is where
          two different file counts came from.</li>
        <li><strong>The file counts now agree.</strong> The world model's walk descended into the
          synthetic <code>/sys</code> subtree, so it reported 146 files in 114 directories for a store
          that holds 44 in 15. It skips virtual entries now, and matches an independent walk exactly.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.86–87 — October 2026</span>
        <span class="v-date">audit honesty, static assets</span></div>
      <ul>
        <li><strong>"Broken refs: 2" named neither of them — because both were documentation.</strong>
          The checker grepped for <code>skill-view &lt;name&gt;</code> in every skill's prose, so
          the placeholder and a quoted example counted as missing skills. Placeholders are now
          skipped, and any real breakage is named:
          <code>Broken refs: 1 (probe-broken-ref → ghost-skill)</code>.</li>
        <li><strong>Two quick reloads no longer break the app.</strong> Opening newOS4 costs about
          35 module requests at once; the site-wide rate zone (60 r/min, burst 50) treated that as a
          flood and served <code>503</code> for part of the bundle — measured 4 modules failing on a
          third reload. Static module and skill files now have their own zone; HTML and API requests
          keep the strict one.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.85 — October 2026</span>
        <span class="v-date">no invented numbers</span></div>
      <ul>
        <li><strong>"999d unused" was a placeholder, printed as if measured.</strong> A skill with no
          usage telemetry got <code>daysUnused = 999</code>, so the audit listed it as unused for
          nearly three years — a fabricated figure that invited archiving good skills. It now
          separates the two real cases: <code>(never used)</code> when there is no
          <code>lastUsed</code> at all, and a genuine day count otherwise.</li>
        <li><strong>The audit already distinguished untracked skills.</strong> 24 skills with no
          telemetry are reported as <em>untracked</em>, not stale — the sentinel was the one place
          that still pretended to know.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.83–84 — October 2026</span>
        <span class="v-date">world_model_query</span></div>
      <ul>
        <li><strong>The first tool the system prompt tells the model to call no longer fails.</strong>
          <code>world_model_query</code> with the default detail parsed
          <code>_modelDigest()</code> as JSON — but that digest was a JSON <em>string</em> cut at 4000
          characters with <code>…(digest truncated)</code> glued on, so it threw
          <code>Unexpected end of JSON input</code> every time. <code>detail:"full"</code> worked only
          because it returned the object and never parsed anything.</li>
        <li><strong>A digest shrinks, it does not break.</strong> The model now builds a real
          snapshot object and drops list lengths (40 → 20 → 10 → 5 → 3 → 1 → 0), and if still too
          large drops whole sections, reporting what it left out in <code>omitted</code>. The string
          form is only produced at the edge, and is always parseable.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.82 — October 2026</span>
        <span class="v-date">skill-create parser</span></div>
      <ul>
        <li><strong>A skill created from the terminal is now the skill you wrote.</strong> The old
          parser joined every argument with a space — so line breaks vanished — and treated the last
          argument as a tag list whenever it contained a comma, which it then also left inside the
          body. A multi-line skill arrived as one line carrying a dozen bogus tags, and it still
          reported success.</li>
        <li><strong>Bodies can come from a file.</strong>
          <code>skill-create &lt;name&gt; &lt;desc&gt; /path/to/body.md --tags=a,b --category=x</code>
          keeps markdown exactly as written; inline text still works for one-liners.</li>
        <li><strong>Tags are opt-in.</strong> Only <code>--tags=</code> creates tags — a comma in your
          prose is no longer a taxonomy. <code>skill-patch</code> accepts a path too, for the same
          reason.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.81 — October 2026</span>
        <span class="v-date">two silent failures</span></div>
      <ul>
        <li><strong>Delegation no longer lies.</strong> <code>outboxResult</code> was declared inside
          the branch that needs the AI module but read outside it, so any delegation with the module
          missing threw <code>outboxResult is not defined</code> — caught as an agent failure, leaving
          the worker idle with no result. It now returns
          <code>queued — AI module not loaded, nothing executed</code> instead of a crash or a false
          "completed".</li>
        <li><strong>Markdown renders.</strong> <code>_docs/*.md</code> was served as
          <code>application/octet-stream</code>, so every document opened as a download. Now
          <code>text/markdown</code>, with <code>nosniff</code>.</li>
        <li><strong>One reply path.</strong> <code>agent-replies.php</code> answers
          <code>410 Gone</code> for reads as well as writes, pointing at the chat channel.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.72–80 — October 2026</span>
        <span class="v-date">hardening after review</span></div>
      <ul>
        <li><strong>The agent can finally see the answer.</strong> The terminal's 30 s poller and the
          agent's <code>chat_hermes read</code> shared one cursor, so the poller printed each reply
          and advanced past it — the human saw it, the model got an empty list. They now keep
          separate cursors, and the tool's first read returns the whole thread.</li>
        <li><strong>A corrupt thread is an error, not an empty one.</strong> A damaged file used to
          read as <code>[]</code>, and the next append rewrote it with a single message. It now
          fails with <code>500</code> and leaves the file alone; <code>chat.py list</code> shows it
          as <code>CORRUPT</code> instead of breaking the listing.</li>
        <li><strong>Cursor survives truncation.</strong> More than 50 new messages cut the response;
          the cursor now stops at the cut instead of the thread tail, so nothing in between is
          skipped for good. Same-millisecond posts get strictly increasing epochs.</li>
        <li><strong>No more double replies.</strong> <code>hermes-poll</code> printed every reply
          twice; it now prints one 🤖 line per message.</li>
        <li><strong>Retry guidance that matches reality.</strong> <code>429</code> says how many
          seconds to wait. A <code>503</code> means the front-end rate zone fired before the app —
          retry, it is not your mistake.</li>
        <li><strong>Hardening.</strong> <code>chat.py show</code> validates the thread id (a
          <code>../</code> path used to reach any <code>.json</code> on the host); lock files are
          group-writable so both sides can open them; the auto-reply prompt treats message text as
          untrusted data and never acts on instructions found in it.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.71 — October 2026</span>
        <span class="v-date">chat bridge</span></div>
      <ul>
        <li><strong>Chat with Hermes from the terminal.</strong> <code>hermes &lt;message&gt;</code>
          (alias: <code>feedback</code>) sends to the operator channel and prints the message id.
          Replies appear by themselves within 30 seconds; <code>hermes-poll</code> checks immediately.</li>
        <li><strong>Contract first.</strong> Shapes, error codes and the millisecond cursor live in
          <code>_docs/chat-contract.md</code>. A wrong token is <code>401</code>, oversize text is
          <code>413</code> (rejected, never trimmed), rate limits are <code>429</code> with
          <code>retry_after_ms</code>.</li>
        <li><strong>One write path.</strong> <code>feedback</code> no longer files a bug report;
          the old replies endpoint answers <code>410 Gone</code>. <code>hermes-reset</code> rotates
          the browser's token and starts a fresh thread.</li>
        <li><strong>The in-page agent can ask too.</strong> New tool <code>chat_hermes</code> —
          send a question, read the answer on a later step.</li>
        <li><strong>Server side.</strong> Per-thread and per-IP rate windows, atomic writes,
          <code>data/chat/</code> unreachable from the web. Host CLI:
          <code>scripts/chat.py list|show|reply</code>.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.57–68 — October 2026</span><span class="v-date">2026-10-23</span></div>
      <ul>
        <li><strong>No shell — and it now says so</strong> — <code>;</code>, <code>&amp;&amp;</code> and <code>||</code> are refused with an explicit message instead of being folded into the command's argv (where <code>wc -l f &amp;&amp; grep -c x f</code> returned a plausible wrong number). A <code>|</code> arriving from the AI <code>run_command</code> tool is refused too, because that path bypasses the pipe splitter and degraded the pattern to empty. Documented at the top of the command reference.</li>
        <li><strong>Multiple paths in <code>wc</code></strong> — <code>wc -c a b</code> printed only <code>a</code> and exited clean. It now prints one line per file plus a <code>total</code>, and reports each missing file separately.</li>
        <li><strong><code>ls</code> prints text</strong> — it rendered only clickable chips (DOM-only), so any capture — the AI <code>run_command</code> tool, the diagnostics sweep — saw an empty result and reported "directory empty".</li>
        <li><strong><code>view_module</code> shows what is deployed</strong> — it returned the <code>_mods/&lt;Class&gt;.js</code> edit cache first, unversioned, so after a rebuild it showed pre-fix source while the bundle was new. It now fetches the deployed file and prefixes the version; the cache is a labelled fallback.</li>
        <li><strong><code>load_skills</code> searches tokens, not one phrase</strong> — the query used to be tested whole against name+description+tags, so <code>"telemetry dashboard"</code> returned 0 while <code>"telemetry"</code> returned 1, and a sentence could never match. Skill <em>bodies</em> were never searched. It now tokenises (stopwords dropped), scores name &gt; description/tags &gt; body, weights by how many tokens matched, keeps a phrase bonus so word order cannot zero a real hit, and reports <code>matchedTokens: 2/3</code> with each result.</li>
        <li><strong>On-demand workers, named as such</strong> — <code>orchestrator-status</code> no longer reports a dispatch ratio as a defect: it prints <code>Mode: on-demand — N/M worker(s) available, X delegation(s) this session</code>, counted inside <code>delegateTask()</code>. Spawn-on-demand is the design; a worker with nothing to do is healthy.</li>
        <li><strong>Predictor store: server canonical</strong> — the file under the user's WebDAV space is authoritative; the browser copy is a 5-minute read-through cache written through on save. A banner appears only when the two disagree, naming both counts. No new endpoint and no unauthenticated write path was added.</li>
        <li><strong><code>grep</code>, <code>head</code> and <code>tail</code> take several paths</strong> — they read only the first path argument and exited clean on the rest, the same silent drop <code>wc</code> had. Multiple files now print <code>file:line: text</code> (grep) or <code>==&gt; file &lt;==</code> (head/tail), and <code>grep -c</code> prints one count per file. <code>tail -f</code> stays single-file and says so.</li>
        <li><strong>An invalid <code>grep</code> pattern is an answer, not a crash</strong> — it used to throw out of the command handler into the error ledger, which is the ledger that has to stay trustworthy. It now prints <code>grep: invalid pattern: …</code> and returns.</li>
        <li><strong>Agent status says what it means</strong> — four agents showed <code>sleeping</code> with no way to tell "waiting for work" from "never handed a task". They now read <code>parked — NEVER SCHEDULED (0 tasks since …)</code> or <code>waiting for work (3 tasks, last …)</code>, plus a dispatch line and a warning when spawning happened but nothing was ever dispatched.</li>
        <li><strong>A guide you can actually find</strong> — <code>guides</code> lists <code>/guides/</code> newest-first; the help page has a Guides section with the command, the preview/cat hints and links to published guides.</li>
        <li><strong>One error counter</strong> — <code>errors</code>, <code>get_dashboard_data</code> and the world model tallied three different sinks (0 / 18 / 11 in the same second). All three now read <code>terminal.countErrors()</code> (DebugSupervisor DB + failed tool calls); the VFS log is reported separately as a mirror, and <code>terminal.log('ERROR', …)</code> now records into the same DB instead of a second store nobody read.</li>
        <li><strong>Predictor arithmetic</strong> — the stored field named <code>mape</code> held a sum, so any JSON consumer read a mean that was <em>n</em> times too large (now <code>errorSum</code>); <code>errorPct</code> is stored raw and clamped only at render (a 475× miss used to be flattened to 500%); predictions are floored at 1 s and floor-hits are not scored, because one 0.079 s aborted run was rounding the next prediction to 0 s.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.56 — October 2026</span><span class="v-date">2026-10-23</span></div>
      <ul>
        <li><strong>Predictor accuracy was structurally 0%</strong> — the denominator counted every observed run while the numerator only moved when a <em>stored prediction</em> matched, and predictions were stored only by the manual <code>predict</code> command. Unpaired runs no longer enter the accuracy denominator; the AI loop now registers a prediction per turn (<code>notePrediction</code>) and <code>predict_task</code> returns a tracked <code>predictionId</code> instead of discarding its estimate.</li>
        <li><strong>Paired scoring</strong> — a prediction is consumed by threaded id → task hash → cli-only feature similarity ≥ 0.5, within a 15-minute TTL (<code>predictor-config pair-ttl &lt;seconds&gt;</code>). A run counts as correct within 30% <em>or</em> 3 seconds of the predicted duration; <code>predictor-status</code> shows paired accuracy, mean error, turns error, pending predictions and unpaired runs.</li>
        <li><strong>Schema v2</strong> — stored payloads from v1 are migrated on load: observed runs and the prediction counter are kept, the meaningless <code>correct/total</code> counters are dropped. Task text is stored as an FNV-1a hash, never in plaintext. Tuning (<code>confidence-threshold</code>, <code>min-data-points</code>, <code>pair-ttl</code>) now persists.</li>
        <li><strong>Knobs that do something</strong> — <code>min-data-points</code> now scales prediction confidence (it was declared, displayed and settable but never read), durations exclude chat-lock queue wait, and the confidence percentages on <code>predict</code>/<code>predict_task</code> will move for the same history (fewer points ⇒ lower confidence).</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.6.52 — October 2026</span><span class="v-date">2026-10-22</span></div>
      <ul>
        <li><strong>Documentation backlog cleared</strong> — 74 commands that the code registered but this page never documented are now in their own sections: <code>dashboard</code> (with <code>--watch</code>/<code>--stop</code>), <code>usage</code>, <code>ps</code>/<code>top</code>/<code>df</code>/<code>free</code>, the six <code>a2a-*</code> mailbox commands, <code>webxai</code>/<code>webx</code>/<code>wx</code>, <code>context</code>/<code>contexts</code>/<code>context-new</code>/<code>context-delete</code>/<code>context-auto</code>/<code>smart-ask</code>, the <code>commit-*</code> approval trio, <code>module-load|unload|enable|reset</code>, <code>memgraph-agent|session|decay-config</code>, <code>orchestrator-schedule|schedules|unschedule</code>, <code>skill-validate|audit|restore|pack-core</code>, <code>learn-skill</code>, <code>encrypt</code>/<code>decrypt</code>, <code>gzip</code>/<code>wget</code>, <code>kanban</code>, <code>three</code>, <code>course</code>, <code>videos</code>, <code>speak</code>/<code>voice</code>/<code>analyze</code>, <code>gui-run|text|clear</code>, the <code>vaultmind-*</code> set, <code>debug-sync</code>/<code>debug-sync-url</code>, <code>setfont</code>, <code>bug</code>, <code>session-new</code>, <code>files</code>, <code>node</code>, <code>sed</code>, <code>nvfs-index-graph</code>, <code>wallet-lookup</code>, <code>ai-model</code>, <code>ai-ignore</code>, <code>webdav-login</code>, <code>view_module</code>, <code>run</code>, <code>sysmsg</code>, <code>history</code>.</li>
        <li><strong>Ghost rows removed</strong> — <code>commands</code>, <code>check</code>, <code>sandbox-kill</code> and <code>webdav-explorer</code> were documented here but are not registered anywhere in the code. Their rows are gone; the sandbox prose no longer promises <code>sandbox-kill</code>.</li>
        <li><strong>Audit method</strong> — the command list is now derived from <code>terminal.js</code> (<code>_baseWhitelist</code>, <code>internals</code>, <code>cmd ===</code> dispatch) plus every <code>commands['…']</code> registration in <code>modules/</code>, so the next gap can be found mechanically.</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.86 — July 2026</span><span class="v-date">2026-07-04</span></div>
      <ul>
        <li><strong>Cold module activation</strong> — Three modules (Memory Graph, Predictor, World Model) were loaded but produced zero actionable data. All now wired into the AI agent loop.</li>
        <li><strong>Predictor feedback loop</strong> — <code>predictor.recordResult()</code> now called after multi-turn AI tasks (toolTurns ≥ 2). Predictor accumulates historical data for duration/turn predictions. Previously had zero call sites — module was dead.</li>
        <li><strong>New AI tools</strong> — <code>predict_task</code> (estimate task duration before starting) and <code>world_model_query</code> (query system self-awareness: modules, skills, files, agents, health, changes, projects). AI now has 51 tools (was 49).</li>
        <li><strong>Memory graph noise suppression</strong> — <code>getContextForPrompt()</code> returns empty string when graph has ≤2 nodes and 0 edges. Eliminates useless <code>[Memory Graph Context] 1 nodes, 0 edges</code> token waste on every AI turn.</li>
        <li><strong>Memory graph task recording</strong> — <code>recordTask()</code> now called for direct AI conversations, not just orchestrator tasks. Graph learns about all AI interactions.</li>
        <li><strong><code>memgraph-learn</code> command</strong> — Documented in help.html but never implemented. Now creates concept+fact nodes with weighted edge. <code>memgraph-learn &lt;entity&gt; &lt;fact&gt;</code>.</li>
        <li><strong><code>getStats()</code> alias</strong> — Orchestrator's <code>_pipelineVerify()</code> called <code>memgraph.getStats()</code> but the method was <code>showStats()</code>. Added <code>getStats()</code> alias returning <code>{nodes, edges, types, totalAccesses}</code>.</li>
        <li><strong>World Model summary fix</strong> — <code>_getTotalModules()</code> returned registry count (7) instead of <code>max(loaded, registry)</code> (43). Summary now shows <code>43/43</code> not <code>43/7</code>.</li>
        <li><strong>Dashboard World Model panel</strong> — New section showing version, last synthesized time, module/skill/file/agent counts, memory graph stats, health, active projects, recent changes.</li>
        <li><strong>System prompt update</strong> — Now mentions <code>predict_task</code> and <code>world_model_query</code> capabilities.</li>
        <li>Cache: <code>2026-07-04-v4.5.86</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.64–v4.5.67 — June 2026</span><span class="v-date">2026-06-18</span></div>
      <ul>
        <li><strong>Orphan removal</strong> — Removed 5 dead modules from core-bundle: <code>MyModule</code>, <code>ModuleIOModule</code>, <code>DynamicPromptsModule</code>, <code>SmartContextModule</code>, <code>DuckDuckGoModule</code>. 454 lines, 23KB saved. 12+ ghost commands cleaned from help.html. <code>modules-index.json</code> 50→45 entries. <code>rebuild-bundles.py</code> updated to prevent resurrection.</li>
        <li><strong>Unified <code>reset</code> command</strong> — Supersedes <code>factory-reset</code>, <code>reset-vfs</code>, <code>reset-mem</code>, <code>config-reset</code>. Subcommands: <code>reset mem</code> (AI state), <code>reset vfs</code> (filesystem), <code>reset config</code> (settings), <code>reset all</code> (nuclear). Old commands kept as aliases.</li>
        <li><strong>Agent loop detection</strong> — <code>agenticLoop</code> now tracks repeated tool calls. Same tool+args 3× triggers loop break with system message. Prevents AI from wasting 8 turns calling <code>ls</code>.</li>
        <li><strong>Agent optimization default OFF</strong> — <code>trivial-optimization</code> was always ON by default (<code>!== 'false'</code>). Changed to default OFF (<code>=== 'true'</code>). Use <code>ai-config trivial-optimization on</code> to enable.</li>
        <li><strong>JS Console fix</strong> — <code>js</code> / <code>js-run</code> commands were not in the security whitelist. At level 1+ they were classified "unknown" and routed to AI instead of dispatching. Added to whitelist — now works.</li>
        <li><strong>Telemetry throttle</strong> — ServerMonitor persisted tool-latency logs every 20 calls. Throttled to every 100 calls or 5 minutes. ~80% fewer VFS writes.</li>
        <li><strong>Pipe security fix</strong> — Pipe chains (<code>cmd1 | cmd2</code>) bypassed ALL security classification. <code>rm foo | cat</code> ran <code>rm</code> with zero checks even at Paranoid level. Each pipe stage now passes through <code>_classify()</code> — destructive and system commands blocked at level 1+.</li>
        <li>Cache: <code>2026-06-18-v4.5.67</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.45–v4.5.63 — June 2026</span><span class="v-date">2026-06-12 to 2026-06-17</span></div>
      <ul>
        <li><strong>Critical ext bundle</strong> — 7 command-critical ext modules (editor, shell, alias, finder, filemgr, diff, busybox) promoted into <code>critical-ext-bundle.js</code> (2,365 lines). Solves HTTP 503 request-storm during boot.</li>
        <li><strong>Core module bundle</strong> — All core modules concatenated into <code>core-bundle.js</code>. Single <code>&lt;script&gt;</code> tag replaces 30 individual loads. <code>rebuild-bundles.py</code> script added.</li>
        <li><strong>VFS session bloat fixes</strong> — v2 metadata-only sessions (no VFS tree). Checkpoints strip system dirs, capped at 3. <code>_purgeTrash()</code> on boot (24h TTL). WebDAV backup deep-clones + strips.</li>
        <li><strong>New modules</strong> — <code>module-agent-registry.js</code> (A2A transport), <code>module-leases.js</code> (agent lifecycle), <code>module-aiasm.js</code> (assembly), <code>module-duckduckgo.js</code> (search, later orphaned), <code>debug-panel.js</code>, <code>skill-pack-core.js</code>.</li>
        <li><strong>A2A scratchpad architecture</strong> — Orchestrator agent-to-agent transport with prune timers, heartbeat checks, idle sweep. 6 <code>a2a-*</code> commands.</li>
        <li><strong>Orchestrator rewrite</strong> — <code>delegateTask</code> re-enters full agentic loop. <code>spawnAgent</code>, <code>orchestrate-parallel</code>, <code>orchestrate-decompose</code>, consensus protocol.</li>
        <li><strong>Deep architecture audit</strong> — 3 parallel subagent investigation of AI subsystem, VFS/state, security/dispatch. Found pipe security bypass, 5 orphaned modules, 6 duplicate localStorage keys, 19 unregistered intervals, 47 bare fetch() calls.</li>
        <li>Cache: various — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.44 — June 2026</span><span class="v-date">2026-06-11</span></div>
      <ul>
        <li><strong>Mindmap organization overhaul</strong> — Pain point #5 shipped. The <code>mindmap</code> command went from 12 subcommands to <strong>40</strong>. <code>mindmap.js</code> grew from 321 to 1127 lines.</li>
        <li><strong>Multi-mindmap support</strong> — No more losing work when switching. <code>mindmap new foo</code> + <code>mindmap new bar</code> creates two in-memory mindmaps. <code>mindmap switch foo</code> to jump between them. <code>mindmap list-loaded</code> shows all in-memory. Current is marked with <code>*</code>, dirty mindmaps with <code>[DIRTY]</code>.</li>
        <li><strong>Dirty-flag warning on load</strong> — <code>mindmap load foo</code> now warns if the current mindmap has unsaved changes. Use <code>--force</code> to override.</li>
        <li><strong>Find by text</strong> — <code>mindmap find &lt;text&gt;</code> searches all node text + tags (case-insensitive). Returns matching IDs and depth.</li>
        <li><strong>Move nodes</strong> — <code>mindmap move &lt;id&gt; &lt;new-parent-id&gt;</code> reparents a node (with all its children). Validates against cycles (can't move under self or descendant).</li>
        <li><strong>Undo</strong> — Stack of last 10 destructive ops. <code>mindmap undo</code> reverses: add, remove, rename, move, color, tag, weight, merge.</li>
        <li><strong>Human-readable aliases</strong> — <code>mindmap alias &lt;id&gt; &lt;name&gt;</code> gives a memorable name. All commands that take an ID (<code>edit</code>, <code>move</code>, <code>color</code>, etc.) now accept either ID or alias.</li>
        <li><strong>Disambiguated delete</strong> — <code>mindmap delete &lt;name&gt;</code> still deletes a FILE (backward compat). New <code>mindmap remove &lt;id&gt;</code> removes a NODE. <code>mindmap delete-file</code> is the explicit form.</li>
        <li><strong>Import</strong> — <code>mindmap import &lt;file&gt;</code> reads from VFS, auto-detects format (JSON/Mermaid/Markdown) by extension or content. Re-generates IDs to avoid collisions.</li>
        <li><strong>Merge</strong> — <code>mindmap merge &lt;name&gt; [--into=&lt;id&gt;]</code> adds a saved mindmap under the current root (or specified parent). Conflict-free: just appends.</li>
        <li><strong>Diff</strong> — <code>mindmap diff &lt;name1&gt; &lt;name2&gt;</code> shows added/removed/modified nodes between two saved mindmaps.</li>
        <li><strong>Stats</strong> — <code>mindmap stats</code> shows total nodes, max depth, nodes per level, colors used, top 10 tags, dirty status, last save time.</li>
        <li><strong>Tags cross-node</strong> — <code>mindmap tags-list [&lt;tag&gt;]</code> shows all tags + counts, or all nodes with a specific tag.</li>
        <li><strong>Clone</strong> — <code>mindmap clone &lt;id&gt;</code> duplicates a node and its children with new IDs. Text gets " (copy)" suffix.</li>
        <li><strong>Archive</strong> — <code>mindmap archive &lt;name&gt;</code> saves to <code>/mindmaps/archive/&lt;name&gt;-&lt;ts&gt;.json</code>. Auto-cleans to last 20.</li>
        <li><strong>Weight</strong> — <code>mindmap weight &lt;id&gt; &lt;1-5&gt;</code> scales node size in SVG output (1=small, 5=large, default=3).</li>
        <li><strong>Mermaid export</strong> — <code>mindmap mermaid</code> (or <code>mindmap export mermaid</code>) prints Mermaid mindmap syntax. Auto-escapes parentheses, brackets, ampersands.</li>
        <li><strong>JSON export</strong> — <code>mindmap json</code> prints the internal JSON (with aliases). Both Markdown and JSON get copied to clipboard.</li>
        <li><strong>Refresh HTML</strong> — <code>mindmap refresh-html</code> regenerates the standalone architecture page from <code>modules-index.json</code>. Writes to <code>/mindmaps/_generated-architecture.html</code> in VFS, prints preview. Deploy with <code>cat &lt;file&gt; &gt; mindmap.html</code>.</li>
        <li><strong>SVG layout fix</strong> — New <code>_layoutTree()</code> algorithm computes subtree widths first, then positions. Handles 30+ node mindmaps without going off-screen. <code>weight</code> affects node size.</li>
        <li>Cache: <code>2026-06-11-v4.5.44</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.43 — June 2026</span><span class="v-date">2026-06-11</span></div>
      <ul>
        <li><strong>Module management overhaul</strong> — Pain point #3 finally shipped. <code>module-list</code> now groups by category (CORE/EXTENSION/FOUNDATION), supports <code>--core --ext --foundation --lazy --eager --loaded --unloaded --failed --disabled --search=&lt;pat&gt; --flat</code> flags, and shows aggregate summary (size, count, failed, disabled).</li>
        <li><strong><code>module-info &lt;name&gt;</code></strong> — Shows module details: status, category, type, path, size, lazy flag, <strong>and the full list of commands it provides</strong> (the biggest gap). Listed in 2 columns.</li>
        <li><strong><code>module-stats</code></strong> — Aggregate view: total/loaded/unloaded/lazy/eager/failed/disabled + total size + total commands.</li>
        <li><strong><code>module-disable / module-enable</code></strong> — Persistently disable a module from auto-loading. Stored in <code>localStorage</code> <code>webx11_module_disabled</code>. Survives refresh. <code>module-loader.js</code> now checks this list and skips disabled modules with a <code>⊘</code> marker in the splash.</li>
        <li><strong><code>module-reload / module-reset</code></strong> — Reload shows old→new diff. Reset clears module's localStorage state and reloads.</li>
        <li><strong>System troubleshooting commands</strong> — Pain point #4.</li>
        <li><strong><code>version</code></strong> — Single command shows: version, build date (parsed from script tag), cache key, browser engine, online status.</li>
        <li><strong><code>uptime</code></strong> — Time since page load (formatted <code>Xh Ym Zs</code>) + last save time.</li>
        <li><strong><code>errors [n]</code></strong> — Alias for <code>logs [n] ERROR</code>. Shows last N errors. Says "No errors found" when logs are clean.</li>
        <li><strong><code>doctor</code></strong> — Runs 8 health checks (network, ollama, VFS size, heap, logs, recent errors, localStorage quota, disabled modules), ranks by severity (🔴/🟡/🟢), shows top 5, and gives recommended actions.</li>
        <li><strong><code>bug-report</code></strong> — Generates a markdown report with system info, recent errors, recent commands, disabled modules, top-level VFS listing. Saves to <code>/tmp/bug-report-&lt;timestamp&gt;.md</code>. Send this file when reporting a bug.</li>
        <li><strong><code>test-net</code></strong> — Checks browser online status, proxy API (<code>/api/stats</code>), Ollama connection, and internet (HEAD to duckduckgo.com). Green/red status for each.</li>
        <li><strong><code>mem</code> enhanced</strong> — Now shows JS heap + localStorage size + sessionStorage size + VFS in-memory size + total. Color-coded thresholds (green/yellow/red).</li>
        <li><strong>Trust violations fixed</strong> — Removed ghost commands <code>commands</code> and <code>check</code> from <code>getHelpInfo()</code> (they were in help but never registered). Fixed <code>memory-map-export</code> to actually save to <code>/memory/reference.md</code> (was: print to terminal).</li>
        <li>Cache: <code>2026-06-11-v4.5.43</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.41 — June 2026</span><span class="v-date">2026-06-11</span></div>
      <ul>
        <li><strong>Search result quality fix</strong> — Default engines changed from <code>google,bing,brave,wikipedia</code> to <code>mojeek,bing</code>. Previous default had 3/4 engines broken (Google/Brave/Wikipedia block datacenter IPs); Bing worked but returned French-localized results due to server's Amsterdam IP. <strong>Mojeek</strong> is a privacy-focused crawler-based search that returns English results regardless of server location.</li>
        <li><strong>Result deduplication</strong> — <code>/api/search</code> now dedupes results by domain and <strong>prefers Mojeek</strong> over Bing (Mojeek is more relevant in this environment). Two-pass: Mojeek first, then Bing for domains not already seen.</li>
        <li><strong>Verified</strong>: <code>search quantum computing</code> now returns "Quantum computing - Wikipedia" as the #1 result (was "iPhone - Apple"). <code>search how to cook risotto</code> now returns actual risotto recipes (was "Cook, les épices bio" - a French spice site).</li>
        <li>Cache: <code>2026-06-11-v4.5.41</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.40 — June 2026</span><span class="v-date">2026-06-10</span></div>
      <ul>
        <li><strong>AI assistant POST support</strong> — <code>web_fetch</code> tool now accepts <code>method=POST</code>, <code>body</code>, and <code>content_type</code> params. AI can now fetch POST-only APIs (Hyperliquid, financial APIs) without telling the user to "use curl". POST routes through <code>/api/fetch</code>; GET still uses <code>/api/extract</code> for cleaner output.</li>
        <li><strong>AI assistant error parsing</strong> — <code>web_search</code> and <code>web_fetch</code> now parse JSON errors from proxy and surface the real reason (was just "HTTP 500" with no details).</li>
        <li><strong>30s frontend timeout</strong> — <code>fetch</code>, <code>extract</code>, and <code>search</code> now abort after 30s with a helpful message. Replaces 15s silent freeze. Implementation: <code>AbortController</code>.</li>
        <li><strong>Loading indicator for <code>--summarize</code></strong> — Shows "⏳ AI overview will be generated (1-3s)..." before the LLM call, so user knows the terminal is alive.</li>
        <li><strong>Extract follow-up hint</strong> — After <code>extract</code>, shows: "💡 Try <code>summarize &lt;url&gt;</code> for AI summary, or <code>nvfs-resolve &lt;concept&gt;</code> to find related files".</li>
        <li><strong>Backend script/style strip</strong> — Extract's regex fallback now strips <code>&lt;script&gt;</code>, <code>&lt;style&gt;</code>, <code>&lt;noscript&gt;</code> and HTML comments. Prevents raw JS leaking into extracted text on BS4 failures.</li>
        <li><strong><code>web</code> alias removed</strong> — Was a duplicate of <code>fetch</code> that didn't appear in autocomplete. Confusing. Just use <code>fetch</code>.</li>
        <li>Cache: <code>2026-06-10-v4.5.40</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.39 — June 2026</span><span class="v-date">2026-06-10</span></div>
      <ul>
        <li><strong>POST support in <code>/api/fetch</code></strong> — Proxy was GET-only, blocking any API that requires POST (Hyperliquid <code>/info</code>, etc). Now accepts <code>method=POST&amp;body=...&amp;content_type=...</code> query params with 10KB body cap and method-aware cache key.</li>
        <li><strong><code>fetch</code> command gains 3 flags</strong> — <code>--post=BODY</code> sends a POST request with the given body, <code>--type=CT</code> sets the Content-Type header (defaults to <code>application/json</code> if <code>--post</code> is set), <code>--raw</code> shows untruncated response. Example: <code>fetch https://api.hyperliquid.xyz/info --post='{"type":"l2Book","coin":"HYPE"}' --type=application/json</code></li>
        <li><strong>Better error messages</strong> — Frontend <code>fetch</code> now parses JSON error from proxy and shows the real reason (was just "HTTP 502" with no details).</li>
        <li>Cache: <code>2026-06-10-v4.5.39</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.38 — June 2026</span><span class="v-date">2026-06-10</span></div>
      <ul>
        <li><strong>Keyboard shortcuts</strong> — <code>Ctrl+L</code> clears the output area, <code>Ctrl+C</code> cancels the current input line (prints <code>^C</code>), <code>Ctrl+U</code> clears the input field. Standard terminal conventions now work.</li>
        <li><strong>Shift+Tab cycles backward</strong> — autocomplete suggestions can be cycled in both directions.</li>
        <li><strong>Send button → 48px tappable</strong> — was 31px (fails mobile/tablet tap target). Now <code>min-width: 48px; min-height: 48px</code> per Android/iOS standards.</li>
        <li><strong>Autocomplete argType fixes</strong> — <code>nvfs-config</code>, <code>nvfs-alias</code>, <code>skill-list</code> now show enum values (config keys, alias actions, skill categories) instead of file paths. <code>nvfs-sync</code>/<code>nvfs-save</code>/<code>nvfs-cancel</code>/<code>nvfs-status</code> marked as <code>argType: 'none'</code> so they don't show file suggestions.</li>
        <li><strong>Stale autocomplete cleared</strong> — Tab suggestions from prior input no longer linger when you start typing something new.</li>
        <li><strong>History cap on startup</strong> — <code>terminal-cmd-history</code> config now applies on page load, not "next save" (which never happened).</li>
        <li>Cache: <code>2026-06-10-v4.5.38</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.37 — June 2026</span><span class="v-date">2026-06-10</span></div>
      <ul>
        <li><strong>/skills/index.json re-index loop FIXED</strong> — <code>skill-pack-core.seed()</code> was rewriting the <code>updated</code> timestamp for all 8 core skills on every page refresh, causing NVFS to see a hash mismatch and re-queue the 7KB JSON for LLM extraction every run. Now <code>seed()</code> compares existing file content to bundled content and only writes the index if something actually changed. Eliminates the 5-concepts-from-1-file loop on every refresh.</li>
        <li><strong>One-time data fix</strong> — After deploying, the existing stale <code>updated</code> timestamp in your VFS will be re-evaluated on next refresh. If it matches the bundled timestamp, the loop stops immediately. If not, one final write happens and the loop is dead thereafter.</li>
        <li>Cache: <code>2026-06-10-v4.5.37</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.36 — June 2026</span><span class="v-date">2026-06-10</span></div>
      <ul>
        <li><strong>Deep pass output shows file paths</strong> — Was "5 LLM concepts across 1 file" (no path). Now lists up to 20 files with their concept counts. Makes it obvious if a single file keeps re-processing every refresh (loop detection).</li>
        <li><strong>Auto-sync output shows file paths</strong> — Same treatment: "re-indexed N file(s)" now lists the actual paths so you can see what's looping.</li>
        <li><strong>nvfs-status shows LLM/fast breakdown</strong> — Two new lines: "Fast concepts: N" and "LLM concepts: N (across M files)". Proves persistence is working without needing DevTools inspection.</li>
        <li><strong>Deep pass message clearer</strong> — "added N new LLM concepts (M files). Total in index: X" — distinguishes the per-pass delta from the persisted total.</li>
        <li>Cache: <code>2026-06-10-v4.5.36</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.35 — June 2026</span><span class="v-date">2026-06-10</span></div>
      <ul>
        <li><strong>NVFS bug fix audit (7 bugs)</strong> — Stale <code>/sys/...</code> entries from pre-v4.5.34 builds cause permanent re-index loops. <code>init()</code> now auto-purges them on first run with a one-time warning.</li>
        <li><strong>Cancel responsive</strong> — <code>nvfs-cancel</code> now checks between every LLM call (was: between every batch of 3). Stop within one 30s call instead of waiting up to 90s.</li>
        <li><strong>Save race fixed</strong> — <code>nvfs-save</code> and end of deep pass now await in-flight VFS save instead of clobbering the debounce flag. Prevents silent LLM concept loss on concurrent writes.</li>
        <li><strong>init() now awaits VFS load</strong> — Was fire-and-forget; first <code>nvfs-status</code> could return empty even when an index existed. <code>module-manager.js</code> already awaits init(), so making it async is safe.</li>
        <li><strong>Deep-mode warning shown once</strong> — Was spammy on every <code>nvfs-index</code> call. Tracked by session flag <code>_warnedAboutLLMStrip</code>.</li>
        <li><strong>Tag extraction fixed</strong> — <code>_extractConcepts</code> used <code>tagMatches[0]</code> (whole match) instead of capture group, so inline <code>#tag1 #tag2</code> only captured <code>#tag1</code>. Now correctly splits on commas or captures all hash tags.</li>
        <li><strong>Filter defensive</strong> — <code>_isSystemFile</code> split into clean two-check structure. <code>node_modules</code> check now uses normalized path so <code>node_modules/foo.js</code> (no leading slash) also gets filtered.</li>
        <li>Cache: <code>2026-06-10-v4.5.35</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.34 — June 2026</span><span class="v-date">2026-06-10</span></div>
      <ul>
        <li><strong>NVFS deep index persistence</strong> — LLM-generated concepts now survive page refresh. <code>_processDeepQueue()</code> calls <code>_saveIndex()</code>. Deep concepts written to disk on completion.</li>
        <li><strong>nvfs-save command</strong> — <code>nvfs-save</code> force-saves the semantic index to VFS disk immediately. Useful before hard refresh.</li>
        <li><strong>Auto-sync deep mode</strong> — <code>nvfs-sync --deep</code> or <code>nvfs-config deep-index on</code> now triggers LLM analysis for dirty files, not just fast filename concepts.</li>
        <li><strong>Safety guard</strong> — Running <code>nvfs-index</code> without <code>--deep</code> when saved index contains LLM concepts prints a warning: they'll be stripped from re-indexed files.</li>
        <li><strong>JS Console module</strong> — New <code>js &lt;expression&gt;</code> command evals JavaScript in page context. <code>js-run &lt;path&gt;</code> loads and executes a VFS script file. Auto-loads at startup.</li>
        <li><strong>Module registration</strong> — <code>console</code> added to packages.json, terminal.js ext loader, and skipList. Auto-loads on next refresh.</li>
        <li>Cache: <code>2026-06-10-v4.5.34</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.24 — June 2026</span><span class="v-date">2026-06-08</span></div>
      <ul>
        <li><strong>tar / untar commands</strong> — New pure-JS tarball parser in cryptogzip.js. <code>tar &lt;src-dir&gt; &lt;out.tar[.gz]&gt;</code> bundles a VFS directory; <code>untar &lt;path.tar[.gz]&gt; [dest-dir]</code> extracts back. Auto-detects gzip wrapper. Fixes the "downloaded newos4.tar.gz but can't extract" problem.</li>
        <li><strong>Binary-safe gzip</strong> — <code>gunzip</code> now preserves binary content (was UTF-8 only). Updated to use base64 roundtrip for binary files.</li>
        <li><strong>POSIX ustar format</strong> — Reads &amp; writes standard ustar tarballs (compatible with GNU tar, BSD tar, macOS tar).</li>
        <li><strong>Cheatsheet updated</strong> — Added 8 entries under 🔧 Tools for tar/untar/gzip/gunzip/encrypt/decrypt/diff/edit</li>
        <li><strong>System prompt</strong> — tar/untar added to [ALL OTHERS] command list</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.23 — June 2026</span><span class="v-date">2026-06-08</span></div>
      <ul>
        <li><strong>Doc version sync</strong> — Help page title, overview, and footer updated to v4.5.22 to match deployed module-loader.js</li>
        <li><strong>Whitepaper v4.5.22</strong> — Bumped from v4.3.0-beta; Last Updated 2026-06-08</li>
        <li><strong>Deprecated module-modmgr</strong> — Removed from BUILTIN array (was duplicate of module-manager.js). Set auto_load=false, layer=deprecated. File retained for one release for rollback safety; deletion scheduled v4.6.0</li>
        <li><strong>Fixed modules-index class</strong> — <code>module-loader</code> class changed from filename string <code>"module-loader.js"</code> to <code>null</code> (foundation file, not a module class)</li>
        <li><strong>packages.json cleanup</strong> — Renamed <code>neural-vfs</code> to <code>neural-vfs-core</code>, category → <code>core</code>, added note that NVFS is built-in not a WPM package</li>
        <li><strong>Cheatsheet coverage</strong> — Added 4 missing commands: <code>sandbox-config</code>, <code>memgraph-export</code>, <code>predictor-config</code>, <code>world-model-config</code></li>
        <li><strong>Audit script fix</strong> — <code>audit-newos4-filesystem.py</code> now respects <code>skills/index.json</code> for orphan detection (no more 26 false-positive warnings on valid skill JSONs)</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5 — June 2026</span><span class="v-date">2026-06-06</span></div>
      <ul>
<li><strong>Security Config CLI</strong> — <code>security-destructive</code>, <code>security-system</code>, <code>security-whitelist</code>, <code>security-flag</code> add|remove|list with localStorage persistence and boot loading</li>
        <li><strong>Enhanced security command</strong> — Shows all sets (destructive, system, whitelist, flags) plus registered command count</li>
        <li><strong>AI loop config</strong> — <code>ai-config max-turns|max-context|trivial-optimization</code> with persistence across sessions</li>
        <li><strong>Unified config CLI</strong> — <code>config</code> command with 4 terminal tuning keys (max-lines, history, pipe-buffer), all persisted in localStorage</li>
        <li><strong>Extended ai-config</strong> — New keys: <code>max-context-tokens</code>, <code>confirm-timeout</code>, <code>chat-lock-timeout</code>, <code>skill-debounce</code> with range validation</li>
        <li><strong>Safe-read run_command</strong> — <code>run_command</code> now command-aware: <code>ls</code>, <code>find</code>, <code>tree</code>, <code>cat</code> auto-approved; only mutating commands require confirmation</li>
        <li><strong>Whitelist expanded (50+ cmds)</strong> — find, grep, tree, head, tail, wc, sort, du, diff, which, hostname, and all BusyBox read-only utils now whitelisted</li>
        <li><strong>Security-bypass fix</strong> — <code>run_command</code> AI tool now routes through <code>checkAndRun()</code> security layer instead of bypassing</li>
        <li><strong>list_files root fallback</strong> — relative paths retry from root if cwd-relative lookup fails</li>
        <li><strong>Confirm timeout configurable</strong> — <code>ai-config confirm-timeout &lt;seconds&gt;</code> accepts 0+ (0 = no confirm / auto-approve all, no upper cap). Dynamic label on confirm bar shows actual timeout.</li>
        <li><strong>Auto-sync Neural VFS</strong> — <code>write_file</code>/<code>mkdir</code>/<code>rm</code>/<code>mv</code>/<code>cp</code> automatically mark index dirty; auto-reindexes after 10s debounce. <code>nvfs-alias</code> command for concept aliases. Hybrid discovery fallback in <code>nvfs-resolve</code> (live VFS scan when index empty). Staleness warning in <code>nvfs-status</code> if index >4h old.</li>
        <li><strong>5 modules whitelisted</strong> — system-health, server, servers, server-check, monitor run directly</li>
        <li><strong>OllamaModule consolidated</strong> — Removed duplicate <code>ollamamodels</code> code path (redirects to <code>models</code>), centralized endpoint via <code>ollamaManager.endpoint</code></li>
        <li><strong>Neural VFS async indexing</strong> — Chunked processing with progress percentage, no UI freeze on large VFS. Improved <code>_summarize</code> (section heading → paragraph → sentence → fallback)</li>
        <li><strong>Neural VFS display-limit config</strong> — <code>nvfs-config</code> command with 4 keys (fuzzy-limit, tree-files, tree-concepts, resolve-files), persisted</li>
        <li><strong>Orchestrator event bus</strong> — In-memory pub/sub for instant A2A delivery (VFS polling remains as fallback). Improved <code>_deriveCapabilities</code> with 14 keyword mappings</li>
        <li><strong>Orchestrator extended config</strong> — 4 new interval keys (a2a-poll-interval, heartbeat-check, idle-sweep-interval, dead-purge-timeout) + all config now persists across sessions</li>
        <li>Cache: <code>2026-06-06-v4.5.11</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.12 — June 2026</span><span class="v-date">2026-06-06</span></div>
      <ul>
        <li><strong>Tiered Indexing toggle</strong> — <code>nvfs-config deep-index on|off</code> switches between Fast (metadata-only, instant) and Deep (LLM-assisted, semantic) modes. Off by default. <code>nvfs-index --deep</code> or <code>nvfs-sync --deep</code> forces deep mode per-run.</li>
        <li><strong>Configurable deep model</strong> — <code>nvfs-config deep-model &lt;name&gt;</code> selects the LLM for deep indexing. Default: <code>gemma4:31b-cloud</code> for speed. Example: <code>nvfs-config deep-model gemma4:31b-cloud</code> for deeper analysis.</li>
        <li><strong>Status bar indicator</strong> — Real-time 🧠 status in terminal bar: concept count + 🌊 wave for deep mode, 🟡 amber for pending auto-sync, 🧠 Deep Indexing progress percentage during LLM processing.</li>
        <li><strong>nvfs-sync command</strong> — <code>nvfs-sync [--deep]</code> for incremental background sync of dirty files.</li>
        <li><strong>Deep concept extraction</strong> — LLM generates 2-5 semantic concepts per file (configurable model via <code>nvfs-config deep-model</code>, default <code>gemma4:31b-cloud</code>, 2000 chars, 3-file batches with UI yield). Fast filename-concepts stored immediately, LLM concepts augment in background queue.</li>
        <li><strong>nvfs-status mode display</strong> — Shows 🌊 Deep or ⚡ Fast mode.</li>
        <li><strong>LLM self-healing</strong> — If Ollama disconnected, deep mode silently falls back to fast metadata-only.</li>
        <li>Cache: <code>2026-06-06-v4.5.12</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.2 — June 2026</span><span class="v-date">2026-06-06</span></div>
      <ul>
        <li><strong>VFS Size Diagnostics</strong> — <code>vfs-size</code> shows total VFS size, top 5 largest files, and system dir sizes</li>
        <li><strong>VFS Clean</strong> — <code>vfs-clean</code> / <code>vfs clean</code> — nuke snapshots, sessions, trash in one shot</li>
        <li><strong>Fractal checkpoint fix</strong> — <code>checkpoint()</code> no longer deep-clones its own <code>/_snapshots/</code>, eliminating recursive bloat. Same for <code>session-save</code></li>
        <li><strong>Ghost commands wired</strong> — <code>checkpoint</code>, <code>checkpoint-list</code>, <code>checkpoint-del</code>, <code>rollback</code> had help text but no handlers — now actually work</li>
        <li><strong>Autocomplete fix</strong> — Built-in commands (vfs-clean, vfs-size) now appear in dropdown</li>
        <li><strong>Editor→_mods bridge</strong> — <code>edit path/to/module.js</code> now mirrors to <code>_mods/</code> for test_module compatibility</li>
        <li><strong>Skill WebDAV Sync</strong> — <code>skill-webdav-sync</code> pushes all skills to WebDAV as JSON files</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.5.11 — June 2026</span><span class="v-date">2026-06-06</span></div>
      <ul>
        <li><strong>init(terminal) fix</strong> — <code>loadModuleFromCode</code> and <code>loadModuleFromURL</code> now pass <code>this.terminal</code> to <code>init()</code>, fixing PredictorModule fatal error</li>
        <li><strong>Save & Test returns value</strong> — <code>saveCodeEditor</code> checks <code>loadModuleFromCode</code> return before printing success</li>
        <li><strong>StateSyncModule recovered</strong> — Extracted from backup, saved to <code>~/.hermes/scripts/</code></li>
        <li><strong>PredictorModule hasSync</strong> — Feature detection for sync/recall tasks with tuned duration/turn prediction</li>
        <li>Cache: <code>2026-06-06-v4.5.11</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.4 — June 2026</span><span class="v-date">2026-06-05</span></div>
      <ul>
        <li><strong>v4.4 complete</strong> — 46 modules, 24 skills, full A2A lifecycle, sandboxed execution, memory graph, world model, health monitoring</li>
        <li><strong>A2A Mailbox Transport</strong> — <code>a2a-send</code>, <code>a2a-list</code>, 500ms polling with envelope routing (request/response/broadcast/heartbeat)</li>
        <li><strong>Autonomous sub-agent spawning</strong> — auto-role derivation, sleep/reanimate VFS serialization</li>
        <li><strong>Sandboxed execution</strong> — WebWorker pool <code>sandbox-run</code> (there is no <code>sandbox-kill</code>; tasks end on timeout) with inline fallback for headless</li>
        <li><strong>A2A Protocol</strong> — Agent contract system: <code>contract-register</code>, <code>contract-list</code>, schema validation in orchestrator</li>
        <li><strong>Self-Optimization Telemetry</strong> — <code>system-health</code> command showing tool latency, VFS stats, error rates</li>
        <li><strong>AI tool: nvfs_resolve</strong> — AI can search VFS by concept</li>
        <li><strong>Skills consolidated</strong> — 9 → 4 unified; index rebuilt minified</li>
        <li><strong>Docs sync</strong> — vision.html and whitepaper updated</li>
        <li>Cache: <code>2026-06-03-neuralvfs</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.3.2 — June 2026</span><span class="v-date">2026-06-04</span></div>
      <ul>
        <li><strong>mindmap svg</strong> — Inline SVG rendering with colored rects + bezier curves</li>
        <li><strong>GUI Builder</strong> — <code>gui</code>, <code>gui-button</code>, <code>gui-input</code> — SimpleGUIModule registered</li>
        <li><strong>mermaid.min.js</strong> — Downloaded for webx11_mindmap.html</li>
        <li><strong>get_module_status fixed</strong> — Shows all 34 loaded modules (was only HTTP-loaded)</li>
        <li><strong>view_module fixed</strong> — Uses modules-index.json to resolve class→file paths</li>
        <li><strong>module-ollamamodels merged</strong> — Into module-ollama (13 commands total)</li>
        <li><strong>concept:// URIs</strong> — <code>cat concept://skill</code> resolves via Neural VFS</li>
        <li><strong>Module categorization</strong> — <code>modules-list</code> shows [core], [ext], [infra] layer tags</li>
        <li><strong>5 modules whitelisted</strong> — system-health, server, servers, server-check, monitor run directly</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.3 — June 2026</span><span class="v-date">2026-06-02</span></div>
      <ul>
        <li><strong>WebDAV Browser</strong> — Modern file-tree UI with checkboxes, Select All, bulk actions (Delete, Move, Download), inline rename (double-click), context menu, breadcrumbs, keyboard shortcuts</li>
        <li><strong>WebDAV commands</strong> — <code>webdav-browser</code>, <code>webdav-rm</code>, <code>webdav-mkdir</code>, <code>webdav-rename</code>, <code>webdav-move</code>, <code>webdav-backup</code></li>
        <li><strong>Skill Pack System</strong> — Auto-loads 12 skills on startup, seed/reload support, skill-pack-core.js manages in-memory index</li>
        <li><strong>Agent Orchestration</strong> — <code>agent-list</code>, <code>agent-register</code>, <code>lease-list</code>, <code>orchestrate</code> for multi-step delegation</li>
        <li><strong>Security Layer</strong> — <code>security-level 0-3</code> with granular restrictions, <code>cmd-allow</code>/<code>cmd-deny</code> per-command access control</li>
        <li><strong>Debug Panel</strong> — <code>debug</code> toggle shows memory, events, errors, module health</li>
        <li><strong>Chat Cleanup</strong> — Removed <code>chat-setapi</code>, <code>chat-setmodel</code>, <code>chat-ask</code>; single <code>chat</code> command toggles overlay</li>
        <li>Module count refactored: 18 core + 14 ext (was 25+17)</li>
        <li><strong>Download fix</strong> — switched from <code>resp.text()</code> to <code>resp.blob()</code> for binary-safe downloads; same fix for image preview (FileReader DataURL)</li>
        <li>Cache: <code>v=40</code> — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.2.1 — May 2026</span><span class="v-date">2026-05-27</span></div>
      <ul>
        <li><strong>BusyBox</strong> — 16 new utility commands: <code>which</code>, <code>env</code>, <code>date</code>, <code>cal</code>, <code>yes</code>, <code>seq</code>, <code>base64</code>, <code>printf</code>, <code>cut</code>, <code>uniq</code>, <code>hostname</code>, <code>whoami</code>, <code>basename</code>, <code>dirname</code>, <code>sleep</code>, <code>expand</code></li>
        <li><strong>Shell</strong> — Full pipe (<code>|</code>), redirect (<code>&gt;</code>, <code>&gt;&gt;</code>, <code>&lt;</code>), chain (<code>&amp;&amp;</code>, <code>||</code>, <code>;</code>), variable (<code>$VAR</code>), and VFS script execution (<code>script</code>)</li>
        <li>Pipe-aware commands (<code>grep</code>, <code>head</code>, <code>tail</code>, <code>sort</code>, <code>wc</code>, <code>cut</code>, <code>uniq</code>, <code>expand</code>) auto-read from pipe via temp file injection</li>
        <li><code>export</code>, <code>unset</code>, <code>set</code> — shell variable management</li>
        <li>Multiple ASI and VFS API bug fixes (<code>fs.fsWrite</code> → <code>fs.writeFile</code> across 3 modules)</li>
        <li><strong>Test Suite</strong> — 32 automated regression tests. Run with <code>load-local modules/test/test-suite.js</code> then <code>test</code>, <code>test auto</code>, or <code>test list</code></li>
        <li>Cache v34 — hard refresh required</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.2 — May 2026</span><span class="v-date">2026-05-25</span></div>
      <ul>
        <li><strong>Editor</strong> — <code>edit &lt;path&gt;</code> opens inline VFS editor modal</li>
        <li><strong>Diff</strong> — <code>diff a b</code> LCS-based comparison + <code>diff --module</code></li>
        <li><strong>Aliases</strong> — <code>ll</code>, <code>h</code>, <code>cls</code> defaults + custom alias definition</li>
        <li><strong>File Finder</strong> — <code>find &lt;query&gt;</code> recursive VFS search</li>
        <li>Agent loop: capped at 8 turns (was 1), <code>edit_module</code> destructive confirmation, model auto-validation</li>
        <li><code>ai-stop</code> now cancels chat + stream, not just tool calls</li>
        <li>Unknown commands awaited, "Command not found" suppressed on AI route</li>
        <li><code>loopResult</code> scope fix — no more undefined error on AI fail</li>
        <li>Preview iframe allows JS (<code>allow-scripts</code>), cache bump <code>v=18</code></li>
        <li>Splash fallback + startup modal list all 12 ext modules</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.1</span><span class="v-date">2026-05-23</span></div>
      <ul>
        <li>AI Agent with full tool-calling loop (28 tools)</li>
        <li>Inline destructive confirmation bar with 120s countdown timer</li>
        <li>Skills system (8 CLI commands + UI modal)</li>
        <li>Voice input (🎤 button, SpeechRecognition, show/hide toggle)</li>
        <li>Sound notification (🔊 toggle, WebAudio ding)</li>
        <li>AI spinner in status bar</li>
        <li>Session system (save/load/recent/stats)</li>
        <li>WebDAV sync (8 commands)</li>
        <li>Web search (SearXNG + DDG + URL fetch/extract)</li>
        <li>Config manager (6 commands + UI)</li>
        <li>Startup modules selector (⚙ gear on splash)</li>
        <li>Code editor modal (module editing, save & test live)</li>
        <li>HTML preview via srcdoc (mobile)</li>
        <li>File/dir autocomplete, pipe support</li>
        <li>Smart context profiles, dynamic prompts with variables</li>
        <li>Server monitor, ChatStudio overlay</li>
        <li>Modular architecture: 23 JS modules, async loader</li>
      </ul>
    </div>

    <div class="version-item">
      <div class="v-header"><span class="v-num">v4.0</span><span class="v-date">2026-05-20</span></div>
      <ul>
        <li>Monolith refactored into core/ext modules</li>
        <li>Async module loader with splash screen</li>
        <li>Config manager modal</li>
        <li>Bootloader fix for disabled modules</li>
      </ul>
    </div>
  </section>
</div>
</main>

<footer>
  <div class="links">
    <a href="./main.html">Launch WebX11</a>
    <a href="https://ollama.com" target="_blank">Ollama</a>
    <a href="/spaces/agando/downloads/changelog.html">Changelog</a>
  </div>
  <p>WebX11 v4.6.119 · 2026</p>
  <p class="tagline">Happy Hacking 🖥️🤖🎤</p>
</footer>

<a href="#" class="back-top" id="backTop">↑</a>

<script>
/* ── Back to Top ── */
const bt = document.getElementById('backTop');
window.addEventListener('scroll',()=>{bt.classList.toggle('visible',window.scrollY>300)});

/* ── Search ── */
function searchDocs(){
  const q=document.getElementById('search-input').value.toLowerCase().trim();
  const msg=document.getElementById('search-result-msg');
  if(!q){msg.style.display='none';return}
  // Search in ALL tabs, switch to the one with results
  const tabs = document.querySelectorAll('.doc-tab');
  let found = false;
  tabs.forEach(tab => {
    if (tab.textContent.toLowerCase().includes(q)) {
      // Found a match in this tab — switch to it
      const tabId = tab.id.replace('content-', 'tab-');
      const radio = document.getElementById(tabId);
      if (radio) {
        radio.checked = true;
        radio.dispatchEvent(new Event('change'));
      }
      // Highlight the matching element
      const sections = tab.querySelectorAll('section, .quick-ref-item, .feature-card, .callout');
      sections.forEach(s => {
        if (s.textContent.toLowerCase().includes(q)) {
          s.scrollIntoView({behavior:'smooth', block:'center'});
          s.style.border='2px solid var(--accent)'; s.style.borderRadius='12px';
          s.style.padding='0 20px'; s.style.transition='border .3s';
          setTimeout(() => { s.style.border='none'; s.style.padding='0'; }, 2000);
          found = true;
        }
      });
    }
  });
  if(!found){
    msg.textContent='No results for "'+q+'"';
    msg.style.display='block';
    setTimeout(()=>{msg.style.display='none'},3000);
  }else{msg.style.display='none'}
}
document.getElementById('search-input').addEventListener('keypress',e=>{if(e.key==='Enter')searchDocs()});

/* ── Smooth scroll nav — switch to User Guide tab first ── */
document.querySelectorAll('.nav-link').forEach(l=>{
  l.addEventListener('click',e=>{
    e.preventDefault();
    const href = l.getAttribute('href');
    // Switch to User Guide tab first
    const guideTab = document.getElementById('tab-guide');
    if (guideTab) {
      guideTab.checked = true;
      guideTab.dispatchEvent(new Event('change'));
    }
    // Then scroll after a short delay so tab content becomes visible
    setTimeout(() => {
      const t = document.querySelector(href);
      if (t) t.scrollIntoView({behavior:'smooth', block:'start'});
    }, 100);
  });
});
/* ── Doc Tabs ── */
document.querySelectorAll('.doc-tabs input').forEach(radio=>{
  radio.addEventListener('change',function(){
    document.querySelectorAll('.doc-tab').forEach(t=>t.classList.remove('active'));
    const tab=document.getElementById('content-'+this.id.replace('tab-',''));
    if(tab)tab.classList.add('active');
    localStorage.setItem('webx11_help_tab',this.id);
  });
});
// Restore last tab
(function(){
  const saved = localStorage.getItem('webx11_help_tab');
  if(saved){
    const el = document.getElementById(saved);
    if(el){ el.checked = true; el.dispatchEvent(new Event('change')); }
  }
})();

console.log('WebX11 v4.3 Docs — Modern');
</script>
</body>
</html>