yakmesh 2.8.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/CHANGELOG.md +637 -0
  2. package/CONTRIBUTING.md +42 -0
  3. package/Caddyfile +77 -0
  4. package/README.md +119 -29
  5. package/adapters/adapter-mlv-bible/README.md +124 -0
  6. package/adapters/adapter-mlv-bible/index.js +400 -0
  7. package/adapters/chat-mod-adapter.js +532 -0
  8. package/adapters/content-adapter.js +273 -0
  9. package/content/api.js +50 -41
  10. package/content/index.js +2 -2
  11. package/content/store.js +355 -173
  12. package/dashboard/index.html +19 -3
  13. package/database/replication.js +117 -37
  14. package/docs/CRYPTO-AGILITY.md +204 -0
  15. package/docs/MTLS-RESEARCH.md +367 -0
  16. package/docs/NAMCHE-SPEC.md +681 -0
  17. package/docs/PEERQUANTA-YAKMESH-INTEGRATION.md +407 -0
  18. package/docs/PRECISION-DISCLOSURE.md +96 -0
  19. package/docs/README.md +76 -0
  20. package/docs/ROADMAP-2.4.0.md +447 -0
  21. package/docs/ROADMAP-2.5.0.md +244 -0
  22. package/docs/SECURITY-AUDIT-REPORT.md +306 -0
  23. package/docs/SST-INTEGRATION.md +712 -0
  24. package/docs/STEADYWATCH-IMPLEMENTATION.md +303 -0
  25. package/docs/TERNARY-AUDIT-REPORT.md +247 -0
  26. package/docs/TME-FAQ.md +221 -0
  27. package/docs/WHITEPAPER.md +623 -0
  28. package/docs/adapters.html +1001 -0
  29. package/docs/advanced-systems.html +1045 -0
  30. package/docs/annex.html +1046 -0
  31. package/docs/api.html +970 -0
  32. package/docs/business/response-templates.md +160 -0
  33. package/docs/c2c.html +1225 -0
  34. package/docs/cli.html +1332 -0
  35. package/docs/configuration.html +1248 -0
  36. package/docs/darshan.html +1085 -0
  37. package/docs/dharma.html +966 -0
  38. package/docs/docs-bundle.html +1075 -0
  39. package/docs/docs.css +3120 -0
  40. package/docs/docs.js +556 -0
  41. package/docs/doko.html +969 -0
  42. package/docs/geo-proof.html +858 -0
  43. package/docs/getting-started.html +840 -0
  44. package/docs/gumba-tutorial.html +1144 -0
  45. package/docs/gumba.html +1098 -0
  46. package/docs/index.html +914 -0
  47. package/docs/jhilke.html +1312 -0
  48. package/docs/karma.html +1100 -0
  49. package/docs/katha.html +1037 -0
  50. package/docs/lama.html +978 -0
  51. package/docs/mandala.html +1067 -0
  52. package/docs/mani.html +964 -0
  53. package/docs/mantra.html +967 -0
  54. package/docs/mesh.html +1409 -0
  55. package/docs/nakpak.html +869 -0
  56. package/docs/namche.html +928 -0
  57. package/docs/nav-order.json +53 -0
  58. package/docs/prahari.html +1043 -0
  59. package/docs/prism-bash.min.js +1 -0
  60. package/docs/prism-javascript.min.js +1 -0
  61. package/docs/prism-json.min.js +1 -0
  62. package/docs/prism-tomorrow.min.css +1 -0
  63. package/docs/prism.min.js +1 -0
  64. package/docs/privacy.html +699 -0
  65. package/docs/quick-reference.html +1181 -0
  66. package/docs/sakshi.html +1402 -0
  67. package/docs/sandboxing.md +386 -0
  68. package/docs/seva.html +911 -0
  69. package/docs/sherpa.html +871 -0
  70. package/docs/studio.html +860 -0
  71. package/docs/stupa.html +995 -0
  72. package/docs/tailwind.min.css +2 -0
  73. package/docs/tattva.html +1332 -0
  74. package/docs/terms.html +686 -0
  75. package/docs/time-server-deployment.md +166 -0
  76. package/docs/time-sources.html +1392 -0
  77. package/docs/tivra.html +1127 -0
  78. package/docs/trademark-policy.html +686 -0
  79. package/docs/tribhuj.html +1183 -0
  80. package/docs/trust-security.html +1029 -0
  81. package/docs/tutorials/backup-recovery.html +654 -0
  82. package/docs/tutorials/dashboard.html +604 -0
  83. package/docs/tutorials/domain-setup.html +605 -0
  84. package/docs/tutorials/host-website.html +456 -0
  85. package/docs/tutorials/mesh-network.html +505 -0
  86. package/docs/tutorials/mobile-access.html +445 -0
  87. package/docs/tutorials/privacy.html +467 -0
  88. package/docs/tutorials/raspberry-pi.html +600 -0
  89. package/docs/tutorials/security-basics.html +539 -0
  90. package/docs/tutorials/share-files.html +431 -0
  91. package/docs/tutorials/troubleshooting.html +637 -0
  92. package/docs/tutorials/trust-karma.html +419 -0
  93. package/docs/tutorials/yak-protocol.html +456 -0
  94. package/docs/tutorials.html +1034 -0
  95. package/docs/vani.html +1270 -0
  96. package/docs/webserver.html +809 -0
  97. package/docs/yak-protocol.html +940 -0
  98. package/docs/yak-timeserver-design.md +475 -0
  99. package/docs/yakapp.html +1015 -0
  100. package/docs/ypc27.html +1069 -0
  101. package/docs/yurt.html +1344 -0
  102. package/embedded-docs/bundle.js +334 -74
  103. package/gossip/protocol.js +247 -27
  104. package/identity/key-resolver.js +262 -0
  105. package/identity/machine-seed.js +632 -0
  106. package/identity/node-key.js +669 -368
  107. package/identity/tribhuj-ratchet.js +506 -0
  108. package/knowledge-base.js +37 -8
  109. package/launcher/yakmesh.bat +62 -0
  110. package/launcher/yakmesh.sh +70 -0
  111. package/mesh/annex.js +462 -108
  112. package/mesh/beacon-broadcast.js +113 -1
  113. package/mesh/darshan.js +1718 -0
  114. package/mesh/gumba.js +1567 -0
  115. package/mesh/jhilke.js +651 -0
  116. package/mesh/katha.js +1012 -0
  117. package/mesh/nakpak-routing.js +8 -5
  118. package/mesh/network.js +724 -34
  119. package/mesh/pulse-sync.js +4 -1
  120. package/mesh/rate-limiter.js +127 -15
  121. package/mesh/seva.js +526 -0
  122. package/mesh/sherpa-discovery.js +89 -8
  123. package/mesh/sybil-defense.js +19 -5
  124. package/mesh/temporal-encoder.js +4 -3
  125. package/mesh/vani.js +1364 -0
  126. package/mesh/yurt.js +1340 -0
  127. package/models/entropy-sentinel.onnx +0 -0
  128. package/models/karma-trust.onnx +0 -0
  129. package/models/manifest.json +43 -0
  130. package/models/sakshi-anomaly.onnx +0 -0
  131. package/oracle/code-proof-protocol.js +7 -6
  132. package/oracle/codebase-lock.js +257 -28
  133. package/oracle/index.js +74 -15
  134. package/oracle/ma902-snmp.js +678 -0
  135. package/oracle/module-sealer.js +5 -3
  136. package/oracle/network-identity.js +16 -0
  137. package/oracle/packet-checksum.js +201 -0
  138. package/oracle/sst.js +579 -0
  139. package/oracle/ternary-144t.js +714 -0
  140. package/oracle/ternary-ml.js +481 -0
  141. package/oracle/time-api.js +239 -0
  142. package/oracle/time-source.js +137 -47
  143. package/oracle/validation-oracle-hardened.js +1111 -1071
  144. package/oracle/validation-oracle.js +4 -2
  145. package/oracle/ypc27.js +211 -0
  146. package/package.json +20 -3
  147. package/protocol/yak-handler.js +35 -9
  148. package/protocol/yak-protocol.js +28 -13
  149. package/reference/cpp/yakmesh_mceliece_shard.cpp +168 -0
  150. package/reference/cpp/yakmesh_ypc27.cpp +179 -0
  151. package/sbom.json +87 -0
  152. package/scripts/security-audit.mjs +264 -0
  153. package/scripts/update-docs-nav.js +194 -0
  154. package/scripts/update-docs-sidebar.cjs +164 -0
  155. package/security/crypto-config.js +4 -3
  156. package/security/dharma-moderation.js +517 -0
  157. package/security/doko-identity.js +193 -143
  158. package/security/domain-consensus.js +86 -85
  159. package/security/fs-hardening.js +620 -0
  160. package/security/hardware-attestation.js +5 -3
  161. package/security/hybrid-trust.js +227 -87
  162. package/security/karma-rate-limiter.js +692 -0
  163. package/security/khata-protocol.js +22 -21
  164. package/security/khata-trust-integration.js +277 -150
  165. package/security/memory-safety.js +635 -0
  166. package/security/mesh-auth.js +11 -10
  167. package/security/mesh-revocation.js +373 -5
  168. package/security/namche-gateway.js +298 -69
  169. package/security/sakshi.js +460 -3
  170. package/security/sangha.js +770 -0
  171. package/security/secure-config.js +473 -0
  172. package/security/silicon-parity.js +13 -10
  173. package/security/steadywatch.js +1142 -0
  174. package/security/strike-system.js +32 -3
  175. package/security/temporal-signing.js +488 -0
  176. package/security/trit-commitment.js +464 -0
  177. package/server/crypto/annex.js +247 -0
  178. package/server/darshan-api.js +343 -0
  179. package/server/index.js +3259 -362
  180. package/server/komm-api.js +668 -0
  181. package/utils/accel.js +2273 -0
  182. package/utils/ternary-id.js +79 -0
  183. package/utils/verify-worker.js +57 -0
  184. package/webserver/index.js +95 -5
  185. package/assets/yakmesh-logo.png +0 -0
  186. package/assets/yakmesh-logo.svg +0 -80
  187. package/assets/yakmesh-logo2.png +0 -0
  188. package/assets/yakmesh-logo2sm.png +0 -0
  189. package/assets/ymsm.png +0 -0
  190. package/website/assets/silhouettes/adapters.svg +0 -107
  191. package/website/assets/silhouettes/api-endpoints.svg +0 -115
  192. package/website/assets/silhouettes/atomic-clock.svg +0 -83
  193. package/website/assets/silhouettes/base-camp.svg +0 -81
  194. package/website/assets/silhouettes/bridge.svg +0 -69
  195. package/website/assets/silhouettes/docs-bundle.svg +0 -113
  196. package/website/assets/silhouettes/doko-basket.svg +0 -70
  197. package/website/assets/silhouettes/fortress.svg +0 -93
  198. package/website/assets/silhouettes/gateway.svg +0 -54
  199. package/website/assets/silhouettes/gears.svg +0 -93
  200. package/website/assets/silhouettes/globe-satellite.svg +0 -67
  201. package/website/assets/silhouettes/karma-wheel.svg +0 -137
  202. package/website/assets/silhouettes/lama-council.svg +0 -141
  203. package/website/assets/silhouettes/mandala-network.svg +0 -169
  204. package/website/assets/silhouettes/mani-stones.svg +0 -149
  205. package/website/assets/silhouettes/mantra-wheel.svg +0 -116
  206. package/website/assets/silhouettes/mesh-nodes.svg +0 -113
  207. package/website/assets/silhouettes/nakpak.svg +0 -56
  208. package/website/assets/silhouettes/peak-lightning.svg +0 -73
  209. package/website/assets/silhouettes/sherpa.svg +0 -69
  210. package/website/assets/silhouettes/stupa-tower.svg +0 -119
  211. package/website/assets/silhouettes/tattva-eye.svg +0 -78
  212. package/website/assets/silhouettes/terminal.svg +0 -74
  213. package/website/assets/silhouettes/webserver.svg +0 -145
  214. package/website/assets/silhouettes/yak.svg +0 -78
  215. package/website/assets/yakmesh-logo.png +0 -0
  216. package/website/assets/yakmesh-logo.webp +0 -0
  217. package/website/assets/yakmesh-logo128x140.webp +0 -0
  218. package/website/assets/yakmesh-logo2.png +0 -0
  219. package/website/assets/yakmesh-logo2.svg +0 -51
  220. package/website/assets/yakmesh-logo40x44.webp +0 -0
  221. package/website/assets/yakmesh.gif +0 -0
  222. package/website/assets/yakmesh.ico +0 -0
  223. package/website/assets/yakmesh.jpg +0 -0
  224. package/website/assets/yakmesh.pdf +0 -0
  225. package/website/assets/yakmesh.png +0 -0
  226. package/website/assets/yakmesh.svg +0 -70
  227. package/website/assets/yakmesh128.webp +0 -0
  228. package/website/assets/yakmesh32.png +0 -0
  229. package/website/assets/yakmesh32.svg +0 -65
  230. package/website/assets/yakmesh32o.ico +0 -2
  231. package/website/assets/yakmesh32o.svg +0 -65
  232. package/website/assets/yakmesh32o.svgz +0 -0
@@ -0,0 +1,1392 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="time-sources">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="icon" href="favicon.ico" sizes="32x32">
7
+ <link rel="icon" href="icon.svg" type="image/svg+xml">
8
+ <link rel="apple-touch-icon" href="apple-touch-icon.png">
9
+ <title>Precision Time Sources | YAKMESH Documentation</title>
10
+ <meta name="description" content="YAKMESH precision time synchronization. Quantum, atomic, GPS, PTP, and NTP time sources for ultra-accurate mesh coordination.">
11
+ <link rel="stylesheet" href="tailwind.min.css">
12
+ <link rel="stylesheet" href="prism-tomorrow.min.css" media="print" onload="this.media='all'">
13
+ <noscript><link rel="stylesheet" href="prism-tomorrow.min.css"></noscript>
14
+ <link rel="stylesheet" href="docs.css">
15
+ <style>
16
+ .theme-accent { color: #fbbf24; }
17
+ .theme-accent-hover:hover { color: #fcd34d; }
18
+ .theme-badge { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
19
+ .theme-border { border-color: #fbbf24; }
20
+ .theme-callout { background: rgba(251, 191, 36, 0.1); border-color: #f59e0b; }
21
+ .active-link { background: rgba(251, 191, 36, 0.2) !important; color: #fcd34d !important; }
22
+ .trust-table { width: 100%; border-collapse: collapse; }
23
+ .trust-table th, .trust-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #2e4c43; }
24
+ .trust-table th { color: #fbbf24; font-weight: 600; background: rgba(251, 191, 36, 0.1); }
25
+ .trust-table code { background: #1f332d; padding: 0.25rem 0.5rem; border-radius: 4px; color: #fcd34d; }
26
+ .trust-level-quantum { background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.2)); border-left: 4px solid #a855f7; }
27
+ .trust-level-atomic { background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2)); border-left: 4px solid #fbbf24; }
28
+ .trust-level-gps { background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.2)); border-left: 4px solid #22c55e; }
29
+ .trust-level-ptp { background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.2)); border-left: 4px solid #3b82f6; }
30
+ .trust-level-ntp { background: linear-gradient(135deg, rgba(156, 163, 175, 0.3), rgba(107, 114, 128, 0.2)); border-left: 4px solid #9ca3af; }
31
+ .trust-level-unsync { background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.2)); border-left: 4px solid #ef4444; }
32
+ .device-path { font-family: monospace; background: #0d1117; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.875rem; }
33
+ </style>
34
+
35
+ <!-- Open Graph -->
36
+ <meta property="og:type" content="article">
37
+ <meta property="og:site_name" content="Yakmesh Documentation">
38
+ <meta property="og:title" content="Time Sources — Yakmesh">
39
+ <meta property="og:description" content="Precision time synchronization — GPS, NTP, and satellite time source integration.">
40
+ </head>
41
+ <body class="bg-mountain-900 text-white min-h-screen">
42
+ <!-- YAKMESH-ICON-SPRITE-START -->
43
+ <svg xmlns="http://www.w3.org/2000/svg" style="display:none">
44
+ <!--
45
+ Yakmesh Docs Icon Sprite Sheet
46
+ 24×24 viewBox — stroke/fill set via .doc-icon CSS
47
+ Usage: <svg class="doc-icon"><use href="#icon-name"/></svg>
48
+ -->
49
+
50
+ <!-- ═══ GUIDES ═══ -->
51
+
52
+ <symbol id="icon-home" viewBox="0 0 24 24">
53
+ <path d="M3 9.5L12 3l9 6.5V20a1 1 0 01-1 1H4a1 1 0 01-1-1V9.5z"/>
54
+ <polyline points="9 22 9 12 15 12 15 22"/>
55
+ </symbol>
56
+
57
+ <symbol id="icon-rocket" viewBox="0 0 24 24">
58
+ <path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 00-2.91-.09z"/>
59
+ <path d="M12 15l-3-3a22 22 0 012-3.95A12.88 12.88 0 0122 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 01-4 2z"/>
60
+ <path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/>
61
+ <path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/>
62
+ </symbol>
63
+
64
+ <symbol id="icon-book" viewBox="0 0 24 24">
65
+ <path d="M4 19.5A2.5 2.5 0 016.5 17H20"/>
66
+ <path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/>
67
+ <line x1="8" y1="7" x2="16" y2="7"/>
68
+ <line x1="8" y1="11" x2="13" y2="11"/>
69
+ </symbol>
70
+
71
+ <!-- ═══ PROTOCOL STACK ═══ -->
72
+
73
+ <!-- YAK:// — Content addressing (yak horns) -->
74
+ <symbol id="icon-yak" viewBox="0 0 24 24">
75
+ <path d="M4 4c1 3 3 5 5 6"/>
76
+ <path d="M20 4c-1 3-3 5-5 6"/>
77
+ <circle cx="12" cy="14" r="5"/>
78
+ <circle cx="10" cy="13" r="0.5" fill="currentColor"/>
79
+ <circle cx="14" cy="13" r="0.5" fill="currentColor"/>
80
+ <path d="M10 16c1 1 3 1 4 0"/>
81
+ </symbol>
82
+
83
+ <!-- ANNEX — Encrypted bridge -->
84
+ <symbol id="icon-annex" viewBox="0 0 24 24">
85
+ <path d="M4 18h3a4 4 0 004-4V8"/>
86
+ <path d="M20 18h-3a4 4 0 01-4-4V8"/>
87
+ <circle cx="7" cy="6" r="2"/>
88
+ <circle cx="17" cy="6" r="2"/>
89
+ <line x1="7" y1="8" x2="7" y2="18"/>
90
+ <line x1="17" y1="8" x2="17" y2="18"/>
91
+ </symbol>
92
+
93
+ <!-- JHILKE — Cricket / steganographic key lifecycle -->
94
+ <symbol id="icon-jhilke" viewBox="0 0 24 24">
95
+ <ellipse cx="12" cy="14" rx="4" ry="6"/>
96
+ <path d="M8 10c-2-3-4-6-3-8"/>
97
+ <path d="M16 10c2-3 4-6 3-8"/>
98
+ <line x1="10" y1="20" x2="8" y2="23"/>
99
+ <line x1="14" y1="20" x2="16" y2="23"/>
100
+ <path d="M9 12l-4 2"/>
101
+ <path d="M15 12l4 2"/>
102
+ </symbol>
103
+
104
+ <!-- NAKPAK — Onion layers / backpack -->
105
+ <symbol id="icon-nakpak" viewBox="0 0 24 24">
106
+ <circle cx="12" cy="12" r="10" opacity="0.3"/>
107
+ <circle cx="12" cy="12" r="7" opacity="0.5"/>
108
+ <circle cx="12" cy="12" r="4" opacity="0.8"/>
109
+ <circle cx="12" cy="12" r="1.5" fill="currentColor"/>
110
+ </symbol>
111
+
112
+ <!-- NAMCHE — Gateway door -->
113
+ <symbol id="icon-namche" viewBox="0 0 24 24">
114
+ <rect x="3" y="3" width="18" height="18" rx="2"/>
115
+ <path d="M9 3v18"/>
116
+ <path d="M15 3v18"/>
117
+ <line x1="3" y1="8" x2="9" y2="8"/>
118
+ <line x1="15" y1="8" x2="21" y2="8"/>
119
+ <circle cx="12" cy="14" r="1" fill="currentColor"/>
120
+ </symbol>
121
+
122
+ <!-- DOKO — Basket / certificate -->
123
+ <symbol id="icon-doko" viewBox="0 0 24 24">
124
+ <path d="M6 8l-2 12h16l-2-12"/>
125
+ <path d="M6 8c0-3 2.7-5 6-5s6 2 6 5"/>
126
+ <line x1="8" y1="10" x2="10" y2="18"/>
127
+ <line x1="16" y1="10" x2="14" y2="18"/>
128
+ <line x1="12" y1="10" x2="12" y2="18"/>
129
+ </symbol>
130
+
131
+ <!-- SHERPA — Mountain climber -->
132
+ <symbol id="icon-sherpa" viewBox="0 0 24 24">
133
+ <path d="M4 20L10 6l3 6 3-4 4 12"/>
134
+ <line x1="4" y1="20" x2="20" y2="20"/>
135
+ <circle cx="13" cy="4" r="1.5"/>
136
+ </symbol>
137
+
138
+ <!-- MANDALA — Network topology web -->
139
+ <symbol id="icon-mandala" viewBox="0 0 24 24">
140
+ <circle cx="12" cy="12" r="9"/>
141
+ <circle cx="12" cy="12" r="4.5"/>
142
+ <line x1="12" y1="3" x2="12" y2="21"/>
143
+ <line x1="3" y1="12" x2="21" y2="12"/>
144
+ <line x1="5.6" y1="5.6" x2="18.4" y2="18.4"/>
145
+ <line x1="18.4" y1="5.6" x2="5.6" y2="18.4"/>
146
+ </symbol>
147
+
148
+ <!-- MANTRA — Gossip / prayer wheel -->
149
+ <symbol id="icon-mantra" viewBox="0 0 24 24">
150
+ <circle cx="12" cy="10" r="7"/>
151
+ <path d="M12 3v14"/>
152
+ <path d="M8 7c2 1.5 6 1.5 8 0"/>
153
+ <path d="M8 13c2-1.5 6-1.5 8 0"/>
154
+ <line x1="12" y1="17" x2="12" y2="22"/>
155
+ <line x1="9" y1="22" x2="15" y2="22"/>
156
+ </symbol>
157
+
158
+ <!-- GUMBA — Temple / access control -->
159
+ <symbol id="icon-gumba" viewBox="0 0 24 24">
160
+ <path d="M12 2L3 9h18z"/>
161
+ <line x1="5" y1="9" x2="5" y2="19"/>
162
+ <line x1="9" y1="9" x2="9" y2="19"/>
163
+ <line x1="15" y1="9" x2="15" y2="19"/>
164
+ <line x1="19" y1="9" x2="19" y2="19"/>
165
+ <line x1="3" y1="19" x2="21" y2="19"/>
166
+ <line x1="3" y1="21" x2="21" y2="21"/>
167
+ </symbol>
168
+
169
+ <!-- YURT — Camp / room -->
170
+ <symbol id="icon-yurt" viewBox="0 0 24 24">
171
+ <path d="M3 20L12 4l9 16"/>
172
+ <line x1="3" y1="20" x2="21" y2="20"/>
173
+ <path d="M10 20v-5a2 2 0 014 0v5"/>
174
+ <path d="M6 14h12"/>
175
+ </symbol>
176
+
177
+ <!-- KATHA — Chat / story scroll -->
178
+ <symbol id="icon-katha" viewBox="0 0 24 24">
179
+ <path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/>
180
+ <line x1="8" y1="8" x2="16" y2="8"/>
181
+ <line x1="8" y1="12" x2="13" y2="12"/>
182
+ </symbol>
183
+
184
+ <!-- VANI — Voice / microphone -->
185
+ <symbol id="icon-vani" viewBox="0 0 24 24">
186
+ <rect x="9" y="2" width="6" height="11" rx="3"/>
187
+ <path d="M5 10a7 7 0 0014 0"/>
188
+ <line x1="12" y1="17" x2="12" y2="22"/>
189
+ <line x1="8" y1="22" x2="16" y2="22"/>
190
+ </symbol>
191
+
192
+ <!-- DARSHAN — Eye / viewing -->
193
+ <symbol id="icon-darshan" viewBox="0 0 24 24">
194
+ <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z"/>
195
+ <circle cx="12" cy="12" r="3"/>
196
+ </symbol>
197
+
198
+ <!-- STUPA — Tower / distributed storage -->
199
+ <symbol id="icon-stupa" viewBox="0 0 24 24">
200
+ <line x1="12" y1="2" x2="12" y2="5"/>
201
+ <path d="M10 5h4l1 3H9z"/>
202
+ <ellipse cx="12" cy="11" rx="5" ry="3"/>
203
+ <ellipse cx="12" cy="15" rx="6" ry="3"/>
204
+ <ellipse cx="12" cy="19" rx="7" ry="3"/>
205
+ </symbol>
206
+
207
+ <!-- LAMA — Crystal ball / consensus -->
208
+ <symbol id="icon-lama" viewBox="0 0 24 24">
209
+ <circle cx="12" cy="10" r="7"/>
210
+ <path d="M12 3c-1.5 2-2 5 0 7s4.5 2 6 0"/>
211
+ <path d="M7 19h10"/>
212
+ <path d="M9 22h6"/>
213
+ <line x1="9" y1="17" x2="9" y2="19"/>
214
+ <line x1="15" y1="17" x2="15" y2="19"/>
215
+ </symbol>
216
+
217
+ <!-- MANI — Prayer stone / time sync -->
218
+ <symbol id="icon-mani" viewBox="0 0 24 24">
219
+ <circle cx="12" cy="12" r="9"/>
220
+ <polyline points="12 6 12 12 16 14"/>
221
+ <circle cx="12" cy="12" r="1" fill="currentColor"/>
222
+ </symbol>
223
+
224
+ <!-- KARMA — Yin-yang / reputation -->
225
+ <symbol id="icon-karma" viewBox="0 0 24 24">
226
+ <circle cx="12" cy="12" r="9"/>
227
+ <path d="M12 3a4.5 4.5 0 010 9 4.5 4.5 0 000 9"/>
228
+ <circle cx="12" cy="7.5" r="1.5" fill="currentColor"/>
229
+ <circle cx="12" cy="16.5" r="1.5"/>
230
+ </symbol>
231
+
232
+ <!-- TATTVA — Quantum elements / atom -->
233
+ <symbol id="icon-tattva" viewBox="0 0 24 24">
234
+ <circle cx="12" cy="12" r="2.5" fill="currentColor" stroke="none"/>
235
+ <ellipse cx="12" cy="12" rx="10" ry="4"/>
236
+ <ellipse cx="12" cy="12" rx="10" ry="4" transform="rotate(60 12 12)"/>
237
+ <ellipse cx="12" cy="12" rx="10" ry="4" transform="rotate(120 12 12)"/>
238
+ </symbol>
239
+
240
+ <!-- TRIBHUJ — Triangle / balanced ternary -->
241
+ <symbol id="icon-tribhuj" viewBox="0 0 24 24">
242
+ <polygon points="12,3 21,20 3,20"/>
243
+ <line x1="12" y1="3" x2="12" y2="20"/>
244
+ <line x1="7.5" y1="11.5" x2="16.5" y2="11.5"/>
245
+ <circle cx="12" cy="14" r="1" fill="currentColor"/>
246
+ </symbol>
247
+
248
+ <!-- YPC-27 — Lock / cipher -->
249
+ <symbol id="icon-ypc27" viewBox="0 0 24 24">
250
+ <rect x="5" y="11" width="14" height="10" rx="2"/>
251
+ <path d="M8 11V7a4 4 0 118 0v4"/>
252
+ <circle cx="12" cy="16" r="1" fill="currentColor"/>
253
+ <line x1="12" y1="17" x2="12" y2="19"/>
254
+ </symbol>
255
+
256
+ <!-- SAKSHI — Witness / aperture eye -->
257
+ <symbol id="icon-sakshi" viewBox="0 0 24 24">
258
+ <circle cx="12" cy="12" r="9"/>
259
+ <path d="M12 3l3 9-3 9"/>
260
+ <path d="M12 3l-3 9 3 9"/>
261
+ <circle cx="12" cy="12" r="2.5"/>
262
+ <circle cx="12" cy="12" r="0.8" fill="currentColor"/>
263
+ </symbol>
264
+
265
+ <!-- PRAMAAN — Globe / geographic proof -->
266
+ <symbol id="icon-pramaan" viewBox="0 0 24 24">
267
+ <circle cx="12" cy="12" r="9"/>
268
+ <ellipse cx="12" cy="12" rx="4" ry="9"/>
269
+ <line x1="3" y1="9" x2="21" y2="9"/>
270
+ <line x1="3" y1="15" x2="21" y2="15"/>
271
+ <path d="M18 4l-2 2 1 3"/>
272
+ <path d="M6 18l2-1 3 1"/>
273
+ </symbol>
274
+
275
+ <!-- SURAKSHA — Shield / security -->
276
+ <symbol id="icon-suraksha" viewBox="0 0 24 24">
277
+ <path d="M12 2l8 4v6c0 5.5-3.8 10.7-8 12-4.2-1.3-8-6.5-8-12V6z"/>
278
+ <polyline points="9 12 11 14 15 10"/>
279
+ </symbol>
280
+
281
+ <!-- TIVRA — Lightning bolt / acceleration -->
282
+ <symbol id="icon-tivra" viewBox="0 0 24 24">
283
+ <polygon points="13,2 3,14 12,14 11,22 21,10 12,10"/>
284
+ </symbol>
285
+
286
+ <!-- PRAHARI — Satellite / sentinel -->
287
+ <symbol id="icon-prahari" viewBox="0 0 24 24">
288
+ <rect x="9" y="9" width="6" height="6" rx="1" transform="rotate(45 12 12)"/>
289
+ <line x1="12" y1="5" x2="12" y2="2"/>
290
+ <line x1="19" y1="12" x2="22" y2="12"/>
291
+ <line x1="12" y1="19" x2="12" y2="22"/>
292
+ <line x1="5" y1="12" x2="2" y2="12"/>
293
+ <path d="M7 7L5 5"/>
294
+ <path d="M17 7l2-2"/>
295
+ </symbol>
296
+
297
+ <!-- DHARMA — Balance scale / content moderation -->
298
+ <symbol id="icon-dharma" viewBox="0 0 24 24">
299
+ <line x1="12" y1="3" x2="12" y2="21"/>
300
+ <line x1="4" y1="7" x2="20" y2="7"/>
301
+ <path d="M4 7l2 7h0a3 3 0 006 0h0l2-7"/>
302
+ <path d="M14 7l2 7h0a3 3 0 006 0h0l2-7"/>
303
+ <line x1="10" y1="21" x2="14" y2="21"/>
304
+ </symbol>
305
+
306
+ <!-- SEVA — Helping hands / NPU sharing -->
307
+ <symbol id="icon-seva" viewBox="0 0 24 24">
308
+ <path d="M12 22c-4 0-8-2-8-6 0-2 1-3 3-4l5-3 5 3c2 1 3 2 3 4 0 4-4 6-8 6z"/>
309
+ <path d="M12 11V5"/>
310
+ <path d="M9 8l3-3 3 3"/>
311
+ <circle cx="12" cy="16" r="2"/>
312
+ </symbol>
313
+
314
+ <!-- ═══ APPLICATIONS ═══ -->
315
+
316
+ <!-- YakApp — Messenger -->
317
+ <symbol id="icon-yakapp" viewBox="0 0 24 24">
318
+ <path d="M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"/>
319
+ </symbol>
320
+
321
+ <!-- C2C — Core to Cosmos -->
322
+ <symbol id="icon-c2c" viewBox="0 0 24 24">
323
+ <circle cx="12" cy="12" r="3"/>
324
+ <circle cx="12" cy="12" r="9"/>
325
+ <path d="M12 3v3"/>
326
+ <path d="M12 18v3"/>
327
+ <path d="M3 12h3"/>
328
+ <path d="M18 12h3"/>
329
+ </symbol>
330
+
331
+ <!-- Studio — Creative suite -->
332
+ <symbol id="icon-studio" viewBox="0 0 24 24">
333
+ <circle cx="13.5" cy="6.5" r="2.5"/>
334
+ <path d="M6 21l4-10 3 5 4-7 4 12"/>
335
+ <rect x="2" y="2" width="20" height="20" rx="2"/>
336
+ </symbol>
337
+
338
+
339
+ <!-- ═══ REFERENCE ═══ -->
340
+
341
+ <!-- Quick Reference — Clipboard -->
342
+ <symbol id="icon-quickref" viewBox="0 0 24 24">
343
+ <path d="M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2"/>
344
+ <rect x="8" y="2" width="8" height="4" rx="1"/>
345
+ <line x1="8" y1="10" x2="16" y2="10"/>
346
+ <line x1="8" y1="14" x2="16" y2="14"/>
347
+ <line x1="8" y1="18" x2="12" y2="18"/>
348
+ </symbol>
349
+
350
+ <!-- GRANTH — Docs bundle -->
351
+ <symbol id="icon-granth" viewBox="0 0 24 24">
352
+ <path d="M4 19.5A2.5 2.5 0 016.5 17H20"/>
353
+ <path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/>
354
+ <path d="M8 7h8"/>
355
+ <path d="M8 11h5"/>
356
+ <path d="M8 15h3"/>
357
+ </symbol>
358
+
359
+ <!-- API — Signal tower -->
360
+ <symbol id="icon-api" viewBox="0 0 24 24">
361
+ <line x1="12" y1="10" x2="12" y2="22"/>
362
+ <path d="M8 6a6 6 0 018 0"/>
363
+ <path d="M5 3a10 10 0 0114 0"/>
364
+ <circle cx="12" cy="10" r="2"/>
365
+ </symbol>
366
+
367
+ <!-- Adapters — Plug connector -->
368
+ <symbol id="icon-adapters" viewBox="0 0 24 24">
369
+ <path d="M6 3v4"/>
370
+ <path d="M10 3v4"/>
371
+ <path d="M4 7h8v3a4 4 0 01-8 0V7z"/>
372
+ <line x1="8" y1="14" x2="8" y2="17"/>
373
+ <path d="M14 10h4v3a2 2 0 01-4 0v-3z"/>
374
+ <line x1="16" y1="7" x2="16" y2="10"/>
375
+ <line x1="16" y1="13" x2="16" y2="17"/>
376
+ <line x1="8" y1="17" x2="16" y2="17"/>
377
+ <line x1="12" y1="17" x2="12" y2="21"/>
378
+ </symbol>
379
+
380
+ <!-- ═══ EXTRA (pages outside nav-order) ═══ -->
381
+
382
+ <!-- Terminal / CLI -->
383
+ <symbol id="icon-terminal" viewBox="0 0 24 24">
384
+ <rect x="2" y="3" width="20" height="18" rx="2"/>
385
+ <polyline points="7 9 10 12 7 15"/>
386
+ <line x1="13" y1="15" x2="17" y2="15"/>
387
+ </symbol>
388
+
389
+ <!-- Gear / Configuration -->
390
+ <symbol id="icon-gear" viewBox="0 0 24 24">
391
+ <circle cx="12" cy="12" r="3"/>
392
+ <path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 01-2.83 2.83l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"/>
393
+ </symbol>
394
+
395
+ <!-- Server / Web hosting -->
396
+ <symbol id="icon-server" viewBox="0 0 24 24">
397
+ <rect x="2" y="2" width="20" height="8" rx="2"/>
398
+ <rect x="2" y="14" width="20" height="8" rx="2"/>
399
+ <line x1="6" y1="6" x2="6.01" y2="6"/>
400
+ <line x1="6" y1="18" x2="6.01" y2="18"/>
401
+ </symbol>
402
+
403
+ <!-- ═══ CHROME / UI ═══ -->
404
+
405
+ <!-- Mountain peak — logo icon (replaces 🏔️) -->
406
+ <symbol id="icon-mountain" viewBox="0 0 24 24">
407
+ <path d="M8 21l4.5-9 3 5.5L19 12l3 9H2l6-9z"/>
408
+ <path d="M12 12l1.5-3L16 14"/>
409
+ </symbol>
410
+
411
+ <!-- Dashboard / bar chart (replaces 📊) -->
412
+ <symbol id="icon-dashboard" viewBox="0 0 24 24">
413
+ <line x1="18" y1="20" x2="18" y2="10"/>
414
+ <line x1="12" y1="20" x2="12" y2="4"/>
415
+ <line x1="6" y1="20" x2="6" y2="14"/>
416
+ <rect x="2" y="2" width="20" height="20" rx="2" stroke-opacity="0.4"/>
417
+ </symbol>
418
+
419
+ <!-- ═══ GENERIC / CONTENT ICONS ═══ -->
420
+
421
+ <!-- Lock / encrypted (replaces 🔐) -->
422
+ <symbol id="icon-lock" viewBox="0 0 24 24">
423
+ <rect x="3" y="11" width="18" height="11" rx="2"/>
424
+ <path d="M7 11V7a5 5 0 0110 0v4"/>
425
+ </symbol>
426
+
427
+ <!-- Signal / broadcast (replaces 📡) -->
428
+ <symbol id="icon-signal" viewBox="0 0 24 24">
429
+ <path d="M2 12a10 10 0 0118 0"/>
430
+ <path d="M5 12a7 7 0 0112 0"/>
431
+ <path d="M8 12a4 4 0 016 0"/>
432
+ <circle cx="11" cy="12" r="1"/>
433
+ </symbol>
434
+
435
+ <!-- Link / chain (replaces 🔗) -->
436
+ <symbol id="icon-link" viewBox="0 0 24 24">
437
+ <path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"/>
438
+ <path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"/>
439
+ </symbol>
440
+
441
+ <!-- Globe / network (replaces 🌐) -->
442
+ <symbol id="icon-globe" viewBox="0 0 24 24">
443
+ <circle cx="12" cy="12" r="10"/>
444
+ <line x1="2" y1="12" x2="22" y2="12"/>
445
+ <path d="M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"/>
446
+ </symbol>
447
+
448
+ <!-- Sync / refresh (replaces 🔄) -->
449
+ <symbol id="icon-sync" viewBox="0 0 24 24">
450
+ <polyline points="23 4 23 10 17 10"/>
451
+ <polyline points="1 20 1 14 7 14"/>
452
+ <path d="M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"/>
453
+ </symbol>
454
+
455
+ <!-- Users / group (replaces 👥) -->
456
+ <symbol id="icon-users" viewBox="0 0 24 24">
457
+ <path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/>
458
+ <circle cx="9" cy="7" r="4"/>
459
+ <path d="M23 21v-2a4 4 0 00-3-3.87"/>
460
+ <path d="M16 3.13a4 4 0 010 7.75"/>
461
+ </symbol>
462
+
463
+ <!-- Shield / protection (replaces 🛡) -->
464
+ <symbol id="icon-shield" viewBox="0 0 24 24">
465
+ <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
466
+ </symbol>
467
+
468
+ <!-- Heartbeat / pulse (replaces 💓) -->
469
+ <symbol id="icon-heartbeat" viewBox="0 0 24 24">
470
+ <path d="M3 12h4l3-9 4 18 3-9h4"/>
471
+ </symbol>
472
+
473
+ <!-- Map pin / location (replaces 📍) -->
474
+ <symbol id="icon-pin" viewBox="0 0 24 24">
475
+ <path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/>
476
+ <circle cx="12" cy="10" r="3"/>
477
+ </symbol>
478
+
479
+ <!-- Traffic light / status (replaces 🚦) -->
480
+ <symbol id="icon-traffic" viewBox="0 0 24 24">
481
+ <rect x="7" y="2" width="10" height="20" rx="3"/>
482
+ <circle cx="12" cy="7" r="1.5"/>
483
+ <circle cx="12" cy="12" r="1.5"/>
484
+ <circle cx="12" cy="17" r="1.5"/>
485
+ </symbol>
486
+
487
+ <!-- Check circle (replaces ✅) -->
488
+ <symbol id="icon-check" viewBox="0 0 24 24">
489
+ <path d="M22 11.08V12a10 10 0 11-5.93-9.14"/>
490
+ <polyline points="22 4 12 14.01 9 11.01"/>
491
+ </symbol>
492
+
493
+ <!-- Megaphone / broadcast (replaces 📢) -->
494
+ <symbol id="icon-megaphone" viewBox="0 0 24 24">
495
+ <path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/>
496
+ </symbol>
497
+
498
+ <!-- Pen / signed (replaces ✍) -->
499
+ <symbol id="icon-pen" viewBox="0 0 24 24">
500
+ <path d="M12 20h9"/>
501
+ <path d="M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4L16.5 3.5z"/>
502
+ </symbol>
503
+
504
+ <!-- Warning / alert (replaces ⚠) -->
505
+ <symbol id="icon-warning" viewBox="0 0 24 24">
506
+ <path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/>
507
+ <line x1="12" y1="9" x2="12" y2="13"/>
508
+ <line x1="12" y1="17" x2="12.01" y2="17"/>
509
+ </symbol>
510
+
511
+ <!-- Hourglass / timer (replaces ⏳) -->
512
+ <symbol id="icon-hourglass" viewBox="0 0 24 24">
513
+ <path d="M6 2h12v5l-4 4 4 4v5H6v-5l4-4-4-4V2z"/>
514
+ </symbol>
515
+
516
+ <!-- Scroll / document (replaces 📜) -->
517
+ <symbol id="icon-scroll" viewBox="0 0 24 24">
518
+ <path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/>
519
+ <polyline points="14 2 14 8 20 8"/>
520
+ <line x1="16" y1="13" x2="8" y2="13"/>
521
+ <line x1="16" y1="17" x2="8" y2="17"/>
522
+ </symbol>
523
+
524
+ <!-- Bolt / lightning (replaces ⚡) -->
525
+ <symbol id="icon-bolt" viewBox="0 0 24 24">
526
+ <polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>
527
+ </symbol>
528
+
529
+ <!-- Target / crosshair (replaces 🎯) -->
530
+ <symbol id="icon-target" viewBox="0 0 24 24">
531
+ <circle cx="12" cy="12" r="10"/>
532
+ <circle cx="12" cy="12" r="6"/>
533
+ <circle cx="12" cy="12" r="2"/>
534
+ </symbol>
535
+
536
+ <!-- Handshake / trust (replaces 🤝) -->
537
+ <symbol id="icon-handshake" viewBox="0 0 24 24">
538
+ <path d="M11 17l-3.5-3.5a2.12 2.12 0 013-3L14 14"/>
539
+ <path d="M20.88 7.12l-3.17 3.17"/>
540
+ <path d="M3.12 7.12l3.17 3.17"/>
541
+ <path d="M2 12h4"/>
542
+ <path d="M18 12h4"/>
543
+ <path d="M7.76 4.25L12 2l4.24 2.25"/>
544
+ </symbol>
545
+
546
+ <!-- Leaf / organic (replaces 🌿) -->
547
+ <symbol id="icon-leaf" viewBox="0 0 24 24">
548
+ <path d="M17 8C8 10 5.9 16.17 3.82 21.34l1.89.66.95-2.3c.48.17.98.3 1.34.3C19 20 22 3 22 3c-1 0-8 0-10 2"/>
549
+ <path d="M7 15c2-2 5.5-3 9-3"/>
550
+ </symbol>
551
+
552
+ <!-- Satellite (replaces 🛰) -->
553
+ <symbol id="icon-satellite" viewBox="0 0 24 24">
554
+ <path d="M13 7L9 3 5 7l4 4"/>
555
+ <path d="M17 11l4 4-4 4-4-4"/>
556
+ <line x1="8" y1="11" x2="13" y2="16"/>
557
+ <line x1="3" y1="21" x2="3.01" y2="21"/>
558
+ <path d="M6 18a3 3 0 000 0"/>
559
+ <path d="M9 15a6 6 0 000 0"/>
560
+ </symbol>
561
+
562
+ <!-- Phone / mobile (replaces 📱) -->
563
+ <symbol id="icon-phone" viewBox="0 0 24 24">
564
+ <rect x="5" y="2" width="14" height="20" rx="2"/>
565
+ <line x1="12" y1="18" x2="12.01" y2="18"/>
566
+ </symbol>
567
+
568
+ <!-- Masks / theater (replaces 🎭) -->
569
+ <symbol id="icon-masks" viewBox="0 0 24 24">
570
+ <circle cx="12" cy="12" r="10"/>
571
+ <path d="M8 14s1.5 2 4 2 4-2 4-2"/>
572
+ <line x1="9" y1="9" x2="9.01" y2="9"/>
573
+ <line x1="15" y1="9" x2="15.01" y2="9"/>
574
+ </symbol>
575
+
576
+ <!-- Stars / cosmos (replaces 🌌) -->
577
+ <symbol id="icon-cosmos" viewBox="0 0 24 24">
578
+ <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>
579
+ </symbol>
580
+
581
+ <!-- Gem / diamond (replaces 💎) -->
582
+ <symbol id="icon-gem" viewBox="0 0 24 24">
583
+ <polygon points="6 3 18 3 22 9 12 22 2 9 6 3"/>
584
+ <line x1="2" y1="9" x2="22" y2="9"/>
585
+ <line x1="12" y1="22" x2="8" y2="9"/>
586
+ <line x1="12" y1="22" x2="16" y2="9"/>
587
+ <line x1="8" y1="9" x2="10" y2="3"/>
588
+ <line x1="16" y1="9" x2="14" y2="3"/>
589
+ </symbol>
590
+
591
+ <!-- Search / magnifying glass (replaces 🔍) -->
592
+ <symbol id="icon-search" viewBox="0 0 24 24">
593
+ <circle cx="11" cy="11" r="8"/>
594
+ <line x1="21" y1="21" x2="16.65" y2="16.65"/>
595
+ </symbol>
596
+
597
+ </svg>
598
+ <!-- YAKMESH-ICON-SPRITE-END -->
599
+ <a href="#mainContent" class="skip-link">Skip to main content</a>
600
+
601
+ <nav class="docs-sidebar" id="sidebar">
602
+ <a href="index.html" class="sidebar-logo">
603
+ <span class="logo-icon"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mountain"/></svg></span>
604
+ <span class="logo-text">Yakmesh</span>
605
+ </a>
606
+ <a href="/dashboard" class="sidebar-dashboard-link"><svg class="doc-icon" aria-hidden="true"><use href="#icon-dashboard"/></svg> <span>Dashboard</span></a>
607
+ <ul class="sidebar-nav">
608
+ <li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-book"/></svg> Guides</span></li>
609
+ <li><a href="index.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-home"/></svg> <span>Overview</span></a></li>
610
+ <li><a href="getting-started.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-rocket"/></svg> <span>Getting Started</span></a></li>
611
+ <li><a href="tutorials.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-book"/></svg> <span>Tutorials</span></a></li>
612
+ <li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-yak"/></svg> Protocol Stack</span></li>
613
+ <li><a href="yak-protocol.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-yak"/></svg> <span>YAK://</span></a></li>
614
+ <li><a href="annex.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-annex"/></svg> <span>ANNEX</span></a></li>
615
+ <li><a href="jhilke.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-jhilke"/></svg> <span>JHILKE</span></a></li>
616
+ <li><a href="nakpak.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-nakpak"/></svg> <span>NAKPAK</span></a></li>
617
+ <li><a href="namche.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-namche"/></svg> <span>NAMCHE</span></a></li>
618
+ <li><a href="doko.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-doko"/></svg> <span>DOKO</span></a></li>
619
+ <li><a href="sherpa.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-sherpa"/></svg> <span>SHERPA</span></a></li>
620
+ <li><a href="mandala.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mandala"/></svg> <span>MANDALA</span></a></li>
621
+ <li><a href="mantra.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mantra"/></svg> <span>MANTRA</span></a></li>
622
+ <li><a href="gumba.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-gumba"/></svg> <span>GUMBA</span></a></li>
623
+ <li><a href="yurt.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-yurt"/></svg> <span>YURT</span></a></li>
624
+ <li><a href="katha.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-katha"/></svg> <span>KATHA</span></a></li>
625
+ <li><a href="vani.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-vani"/></svg> <span>VANI</span></a></li>
626
+ <li><a href="darshan.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-darshan"/></svg> <span>DARSHAN</span></a></li>
627
+ <li><a href="stupa.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-stupa"/></svg> <span>STUPA</span></a></li>
628
+ <li><a href="lama.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-lama"/></svg> <span>LAMA</span></a></li>
629
+ <li><a href="mani.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mani"/></svg> <span>MANI</span></a></li>
630
+ <li><a href="karma.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-karma"/></svg> <span>KARMA</span></a></li>
631
+ <li><a href="tattva.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tattva"/></svg> <span>TATTVA</span></a></li>
632
+ <li><a href="tribhuj.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tribhuj"/></svg> <span>TRIBHUJ</span></a></li>
633
+ <li><a href="ypc27.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-ypc27"/></svg> <span>YPC-27</span></a></li>
634
+ <li><a href="sakshi.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-sakshi"/></svg> <span>SAKSHI</span></a></li>
635
+ <li><a href="geo-proof.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-pramaan"/></svg> <span>PRAMAAN</span></a></li>
636
+ <li><a href="trust-security.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-suraksha"/></svg> <span>SURAKSHA</span></a></li>
637
+ <li><a href="tivra.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tivra"/></svg> <span>TIVRA</span></a></li>
638
+ <li><a href="prahari.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-prahari"/></svg> <span>PRAHARI</span></a></li>
639
+ <li><a href="dharma.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-dharma"/></svg> <span>DHARMA</span></a></li>
640
+ <li><a href="seva.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-seva"/></svg> <span>SEVA</span></a></li>
641
+ <li><a href="docs-bundle.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-granth"/></svg> <span>GRANTH</span></a></li>
642
+ <li><a href="api.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-api"/></svg> <span>API</span></a></li>
643
+ <li><a href="adapters.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-adapters"/></svg> <span>Adapters</span></a></li>
644
+ <li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-rocket"/></svg> Applications</span></li>
645
+ <li><a href="yakapp.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-yakapp"/></svg> <span>YakApp</span></a></li>
646
+ <li><a href="c2c.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-c2c"/></svg> <span>C2C</span></a></li>
647
+ <li><a href="studio.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-studio"/></svg> <span>Studio</span></a></li>
648
+ <li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-gear"/></svg> Infrastructure</span></li>
649
+ <li><a href="cli.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-terminal"/></svg> <span>CLI</span></a></li>
650
+ <li><a href="configuration.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-gear"/></svg> <span>Configuration</span></a></li>
651
+ <li><a href="mesh.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mandala"/></svg> <span>Mesh Network</span></a></li>
652
+ <li><a href="time-sources.html" class="active"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mani"/></svg> <span>Time Sources</span></a></li>
653
+ <li><a href="webserver.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-server"/></svg> <span>Web Server</span></a></li>
654
+ <li><a href="advanced-systems.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tivra"/></svg> <span>Advanced Systems</span></a></li>
655
+ <li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-book"/></svg> Tutorials</span></li>
656
+ <li><a href="gumba-tutorial.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-gumba"/></svg> <span>GUMBA Tutorial</span></a></li>
657
+ <li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-quickref"/></svg> Reference</span></li>
658
+ <li><a href="quick-reference.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-quickref"/></svg> <span>Quick Ref</span></a></li>
659
+ </ul>
660
+ </nav>
661
+
662
+ <button class="sidebar-toggle" id="sidebarToggle" title="Toggle sidebar">
663
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
664
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7" />
665
+ </svg>
666
+ </button>
667
+
668
+ <!-- Mobile overlay for tap-to-close sidebar -->
669
+ <div class="sidebar-overlay" id="sidebarOverlay"></div>
670
+
671
+ <main class="docs-main" id="mainContent">
672
+
673
+ <div class="docs-content">
674
+ <!-- Page Header -->
675
+ <div class="flex items-center gap-3 mb-4">
676
+ <svg class="doc-icon hero-icon" aria-hidden="true"><use href="#icon-mani"/></svg>
677
+ <div>
678
+ <div class="flex items-center gap-3">
679
+ <h1 class="text-4xl font-bold">Precision Time Sources</h1>
680
+ <span class="theme-badge text-xs px-2 py-1 rounded-full font-mono">v2.0.0</span>
681
+ </div>
682
+ <p class="theme-accent">Sub-millisecond synchronization for mesh coordination</p>
683
+ </div>
684
+ </div>
685
+ <p class="text-xl text-mountain-300 mb-8">
686
+ YAKMESH integrates with quantum, atomic, GPS, PTP, and NTP time sources to enable precision-grade
687
+ phase synchronization across the mesh network.
688
+ </p>
689
+
690
+ <!-- Overview Callout -->
691
+ <div class="theme-callout rounded-xl p-6 mb-8 border">
692
+ <p class="font-semibold mb-2 theme-accent"><svg class="doc-icon inline-icon" width="24" height="24" aria-hidden="true"><use href="#icon-target"/></svg> Why Precision Time Matters</p>
693
+ <p class="text-mountain-300 text-sm mb-4">
694
+ YAKMESH uses <strong>phase epochs</strong> to coordinate network consensus. Higher-precision time sources
695
+ enable tighter phase windows, reducing attack surfaces and improving network synchronization.
696
+ </p>
697
+ <ul class="text-mountain-400 text-sm space-y-1">
698
+ <li>• Atomic-tier nodes can serve as <strong>time oracles</strong> for the network</li>
699
+ <li>• GPS/PTP nodes can validate tight phase windows</li>
700
+ <li>• NTP nodes still participate but with wider tolerance margins</li>
701
+ </ul>
702
+ </div>
703
+
704
+ <!-- Trust Levels Section -->
705
+ <h2 class="text-2xl font-bold mb-4" id="trust-levels">Trust Levels</h2>
706
+ <p class="text-mountain-300 mb-6">
707
+ Time sources are classified into trust levels based on their precision and reliability.
708
+ Higher trust levels enable tighter phase tolerances for consensus operations.
709
+ </p>
710
+
711
+ <!-- Trust Level Cards -->
712
+ <div class="space-y-4 mb-8">
713
+ <!-- QUANTUM -->
714
+ <div class="trust-level-quantum rounded-xl p-5">
715
+ <div class="flex items-center justify-between mb-3">
716
+ <div class="flex items-center gap-3">
717
+ <svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-lama"/></svg>
718
+ <div>
719
+ <h3 class="text-xl font-bold text-purple-300">QUANTUM</h3>
720
+ <span class="text-sm text-purple-400">Level 5 • Stratum 0</span>
721
+ </div>
722
+ </div>
723
+ <div class="text-right">
724
+ <div class="text-2xl font-mono text-purple-300">±1ms</div>
725
+ <div class="text-xs text-purple-400">tolerance</div>
726
+ </div>
727
+ </div>
728
+ <p class="text-mountain-300 text-sm mb-3">
729
+ Quantum optical network time sources including White Rabbit PTP (WR-PTP),
730
+ optical atomic references, and entanglement-based synchronization. Sub-nanosecond capable.
731
+ </p>
732
+ <div class="flex flex-wrap gap-2">
733
+ <span class="text-xs bg-purple-900/50 text-purple-300 px-2 py-1 rounded">WR-PTP</span>
734
+ <span class="text-xs bg-purple-900/50 text-purple-300 px-2 py-1 rounded">Optical Atomic</span>
735
+ <span class="text-xs bg-purple-900/50 text-purple-300 px-2 py-1 rounded">Entanglement Sync</span>
736
+ </div>
737
+ </div>
738
+
739
+ <!-- ATOMIC -->
740
+ <div class="trust-level-atomic rounded-xl p-5">
741
+ <div class="flex items-center justify-between mb-3">
742
+ <div class="flex items-center gap-3">
743
+ <svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-tattva"/></svg>
744
+ <div>
745
+ <h3 class="text-xl font-bold text-yellow-300">ATOMIC</h3>
746
+ <span class="text-sm text-yellow-400">Level 4 • Stratum 0</span>
747
+ </div>
748
+ </div>
749
+ <div class="text-right">
750
+ <div class="text-2xl font-mono text-yellow-300">±100ms</div>
751
+ <div class="text-xs text-yellow-400">tolerance</div>
752
+ </div>
753
+ </div>
754
+ <p class="text-mountain-300 text-sm mb-3">
755
+ PCIe atomic clocks including Chip-Scale Atomic Clocks (CSAC) and Rubidium oscillators.
756
+ Reference-grade timing for infrastructure nodes.
757
+ </p>
758
+ <div class="flex flex-wrap gap-2">
759
+ <span class="text-xs bg-yellow-900/50 text-yellow-300 px-2 py-1 rounded">PCIe CSAC</span>
760
+ <span class="text-xs bg-yellow-900/50 text-yellow-300 px-2 py-1 rounded">Rubidium</span>
761
+ <span class="text-xs bg-yellow-900/50 text-yellow-300 px-2 py-1 rounded">SA.45s</span>
762
+ <span class="text-xs bg-yellow-900/50 text-yellow-300 px-2 py-1 rounded">Caesium</span>
763
+ </div>
764
+ </div>
765
+
766
+ <!-- GPS -->
767
+ <div class="trust-level-gps rounded-xl p-5">
768
+ <div class="flex items-center justify-between mb-3">
769
+ <div class="flex items-center gap-3">
770
+ <svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-satellite"/></svg>
771
+ <div>
772
+ <h3 class="text-xl font-bold text-green-300">GPS</h3>
773
+ <span class="text-sm text-green-400">Level 3 • Stratum 1</span>
774
+ </div>
775
+ </div>
776
+ <div class="text-right">
777
+ <div class="text-2xl font-mono text-green-300">±500ms</div>
778
+ <div class="text-xs text-green-400">tolerance</div>
779
+ </div>
780
+ </div>
781
+ <p class="text-mountain-300 text-sm mb-3">
782
+ Hardware GPS receivers with PPS (Pulse-Per-Second) signal output.
783
+ Provides globally synchronized timing from satellite constellation.
784
+ </p>
785
+ <div class="flex flex-wrap gap-2">
786
+ <span class="text-xs bg-green-900/50 text-green-300 px-2 py-1 rounded">PPS Signal</span>
787
+ <span class="text-xs bg-green-900/50 text-green-300 px-2 py-1 rounded">gpsd</span>
788
+ <span class="text-xs bg-green-900/50 text-green-300 px-2 py-1 rounded">u-blox</span>
789
+ <span class="text-xs bg-green-900/50 text-green-300 px-2 py-1 rounded">Trimble</span>
790
+ </div>
791
+ </div>
792
+
793
+ <!-- PTP -->
794
+ <div class="trust-level-ptp rounded-xl p-5">
795
+ <div class="flex items-center justify-between mb-3">
796
+ <div class="flex items-center gap-3">
797
+ <svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-link"/></svg>
798
+ <div>
799
+ <h3 class="text-xl font-bold text-blue-300">PTP</h3>
800
+ <span class="text-sm text-blue-400">Level 2 • Stratum 1</span>
801
+ </div>
802
+ </div>
803
+ <div class="text-right">
804
+ <div class="text-2xl font-mono text-blue-300">±500ms</div>
805
+ <div class="text-xs text-blue-400">tolerance</div>
806
+ </div>
807
+ </div>
808
+ <p class="text-mountain-300 text-sm mb-3">
809
+ IEEE 1588 Precision Time Protocol with hardware timestamping.
810
+ Network-based synchronization for data center and enterprise deployments.
811
+ </p>
812
+ <div class="flex flex-wrap gap-2">
813
+ <span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">IEEE 1588</span>
814
+ <span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">ptp4l</span>
815
+ <span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">phc2sys</span>
816
+ <span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">Meinberg</span>
817
+ </div>
818
+ </div>
819
+
820
+ <!-- NTP -->
821
+ <div class="trust-level-ntp rounded-xl p-5">
822
+ <div class="flex items-center justify-between mb-3">
823
+ <div class="flex items-center gap-3">
824
+ <svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-globe"/></svg>
825
+ <div>
826
+ <h3 class="text-xl font-bold text-gray-300">NTP</h3>
827
+ <span class="text-sm text-gray-400">Level 1 • Stratum 2</span>
828
+ </div>
829
+ </div>
830
+ <div class="text-right">
831
+ <div class="text-2xl font-mono text-gray-300">±5000ms</div>
832
+ <div class="text-xs text-gray-400">tolerance</div>
833
+ </div>
834
+ </div>
835
+ <p class="text-mountain-300 text-sm mb-3">
836
+ Standard Network Time Protocol synchronization.
837
+ Universal fallback available on all network-connected systems.
838
+ </p>
839
+ <div class="flex flex-wrap gap-2">
840
+ <span class="text-xs bg-gray-800/50 text-gray-300 px-2 py-1 rounded">chrony</span>
841
+ <span class="text-xs bg-gray-800/50 text-gray-300 px-2 py-1 rounded">ntpd</span>
842
+ <span class="text-xs bg-gray-800/50 text-gray-300 px-2 py-1 rounded">systemd-timesyncd</span>
843
+ <span class="text-xs bg-gray-800/50 text-gray-300 px-2 py-1 rounded">w32tm</span>
844
+ </div>
845
+ </div>
846
+
847
+ <!-- UNSYNC -->
848
+ <div class="trust-level-unsync rounded-xl p-5">
849
+ <div class="flex items-center justify-between mb-3">
850
+ <div class="flex items-center gap-3">
851
+ <svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-warning"/></svg>
852
+ <div>
853
+ <h3 class="text-xl font-bold text-red-300">UNSYNC</h3>
854
+ <span class="text-sm text-red-400">Level 0 • Stratum 16</span>
855
+ </div>
856
+ </div>
857
+ <div class="text-right">
858
+ <div class="text-2xl font-mono text-red-300">±30000ms</div>
859
+ <div class="text-xs text-red-400">tolerance</div>
860
+ </div>
861
+ </div>
862
+ <p class="text-mountain-300 text-sm mb-3">
863
+ No reliable time source available. Degraded mode with wide tolerance.
864
+ Node cannot participate in time-critical consensus operations.
865
+ </p>
866
+ <div class="flex flex-wrap gap-2">
867
+ <span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Degraded Mode</span>
868
+ <span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Local Clock Only</span>
869
+ </div>
870
+ </div>
871
+ </div>
872
+
873
+ <!-- Trust Levels Table -->
874
+ <h3 class="text-xl font-bold mb-4">Quick Reference Table</h3>
875
+ <div class="overflow-x-auto mb-8">
876
+ <table class="trust-table rounded-lg overflow-hidden">
877
+ <thead>
878
+ <tr>
879
+ <th>Trust Level</th>
880
+ <th>Rank</th>
881
+ <th>Stratum</th>
882
+ <th>Tolerance</th>
883
+ <th>Epoch Duration</th>
884
+ <th>Grace Period</th>
885
+ <th>Use Case</th>
886
+ </tr>
887
+ </thead>
888
+ <tbody>
889
+ <tr>
890
+ <td><code>QUANTUM</code></td>
891
+ <td>5</td>
892
+ <td>0</td>
893
+ <td>±1ms</td>
894
+ <td>1 hour</td>
895
+ <td>1 min</td>
896
+ <td>Research labs, quantum networks</td>
897
+ </tr>
898
+ <tr>
899
+ <td><code>ATOMIC</code></td>
900
+ <td>4</td>
901
+ <td>0</td>
902
+ <td>±100ms</td>
903
+ <td>1 hour</td>
904
+ <td>1 min</td>
905
+ <td>Time oracles, infrastructure nodes</td>
906
+ </tr>
907
+ <tr>
908
+ <td><code>GPS</code></td>
909
+ <td>3</td>
910
+ <td>1</td>
911
+ <td>±500ms</td>
912
+ <td>2 hours</td>
913
+ <td>5 min</td>
914
+ <td>Edge nodes, outdoor deployments</td>
915
+ </tr>
916
+ <tr>
917
+ <td><code>PTP</code></td>
918
+ <td>2</td>
919
+ <td>1</td>
920
+ <td>±500ms</td>
921
+ <td>2 hours</td>
922
+ <td>5 min</td>
923
+ <td>Data centers, enterprise networks</td>
924
+ </tr>
925
+ <tr>
926
+ <td><code>NTP</code></td>
927
+ <td>1</td>
928
+ <td>2</td>
929
+ <td>±5000ms</td>
930
+ <td>6 hours</td>
931
+ <td>15 min</td>
932
+ <td>Standard nodes, home users</td>
933
+ </tr>
934
+ <tr>
935
+ <td><code>UNSYNC</code></td>
936
+ <td>0</td>
937
+ <td>16</td>
938
+ <td>±30000ms</td>
939
+ <td>12 hours</td>
940
+ <td>30 min</td>
941
+ <td>Degraded mode, offline operation</td>
942
+ </tr>
943
+ </tbody>
944
+ </table>
945
+ </div>
946
+
947
+ <!-- TimeSourceDetector Section -->
948
+ <h2 class="text-2xl font-bold mb-4" id="time-source-detector">TimeSourceDetector Class</h2>
949
+ <p class="text-mountain-300 mb-6">
950
+ The <code class="bg-mountain-800 px-2 py-1 rounded theme-accent">TimeSourceDetector</code> class
951
+ automatically detects available time sources and selects the highest-quality option.
952
+ </p>
953
+
954
+ <h3 class="text-xl font-bold mb-3">Basic Usage</h3>
955
+ <pre class="language-javascript mb-6"><code>import {
956
+ TimeSourceDetector,
957
+ TimeTrustLevel,
958
+ PhaseTolerance
959
+ } from './oracle/time-source.js';
960
+
961
+ // Create detector with hardware detection enabled
962
+ const detector = new TimeSourceDetector({
963
+ detectHardware: true,
964
+ checkNtp: true,
965
+ refreshInterval: 60000, // Re-check every minute
966
+ verbose: true
967
+ });
968
+
969
+ // Start continuous monitoring
970
+ detector.start();
971
+
972
+ // Get detection results
973
+ const results = detector.detect();
974
+ console.log('Primary source:', results.primarySource);
975
+ console.log('Trust level:', results.trustLevel);
976
+ console.log('Phase tolerance:', results.phaseTolerance, 'ms');</code></pre>
977
+
978
+ <h3 class="text-xl font-bold mb-3">Constructor Options</h3>
979
+ <div class="overflow-x-auto mb-6">
980
+ <table class="trust-table rounded-lg overflow-hidden">
981
+ <thead>
982
+ <tr>
983
+ <th>Option</th>
984
+ <th>Type</th>
985
+ <th>Default</th>
986
+ <th>Description</th>
987
+ </tr>
988
+ </thead>
989
+ <tbody>
990
+ <tr>
991
+ <td><code>detectHardware</code></td>
992
+ <td>boolean</td>
993
+ <td><code>true</code></td>
994
+ <td>Enable detection of atomic clocks, GPS, and PTP devices</td>
995
+ </tr>
996
+ <tr>
997
+ <td><code>checkNtp</code></td>
998
+ <td>boolean</td>
999
+ <td><code>true</code></td>
1000
+ <td>Check NTP/Chrony synchronization status</td>
1001
+ </tr>
1002
+ <tr>
1003
+ <td><code>customDevices</code></td>
1004
+ <td>object</td>
1005
+ <td><code>{}</code></td>
1006
+ <td>Custom device paths for detection</td>
1007
+ </tr>
1008
+ <tr>
1009
+ <td><code>refreshInterval</code></td>
1010
+ <td>number</td>
1011
+ <td><code>60000</code></td>
1012
+ <td>Refresh interval in milliseconds (0 to disable)</td>
1013
+ </tr>
1014
+ <tr>
1015
+ <td><code>verbose</code></td>
1016
+ <td>boolean</td>
1017
+ <td><code>false</code></td>
1018
+ <td>Enable verbose logging of detection results</td>
1019
+ </tr>
1020
+ </tbody>
1021
+ </table>
1022
+ </div>
1023
+
1024
+ <h3 class="text-xl font-bold mb-3">Key Methods</h3>
1025
+ <pre class="language-javascript mb-6"><code>// Start continuous monitoring
1026
+ detector.start();
1027
+
1028
+ // Stop monitoring
1029
+ detector.stop();
1030
+
1031
+ // Manual detection
1032
+ const results = detector.detect();
1033
+
1034
+ // Get current trust level
1035
+ const trust = detector.getTrustLevel(); // 'atomic', 'gps', 'ntp', etc.
1036
+
1037
+ // Get phase tolerance in milliseconds
1038
+ const tolerance = detector.getPhaseTolerance(); // e.g., 100
1039
+
1040
+ // Get NTP stratum equivalent
1041
+ const stratum = detector.getStratum(); // e.g., 0, 1, 2, 16
1042
+
1043
+ // Check if atomic-tier time is available
1044
+ if (detector.hasAtomicTime()) {
1045
+ console.log('Node can serve as time oracle');
1046
+ }
1047
+
1048
+ // Check if high-precision time is available (atomic, GPS, or PTP)
1049
+ if (detector.hasHighPrecisionTime()) {
1050
+ console.log('Node can validate tight phase windows');
1051
+ }
1052
+
1053
+ // Get full status object for API responses
1054
+ const status = detector.getStatus();</code></pre>
1055
+
1056
+ <h3 class="text-xl font-bold mb-3">Event Handling</h3>
1057
+ <pre class="language-javascript mb-8"><code>// Listen for detection events
1058
+ detector.on('detected', (results) => {
1059
+ console.log('Time sources detected:', results);
1060
+ console.log('Primary:', results.primarySource);
1061
+ console.log('Trust:', results.trustLevel);
1062
+ console.log('Tolerance:', results.phaseTolerance, 'ms');
1063
+ });</code></pre>
1064
+
1065
+ <!-- Device Paths Section -->
1066
+ <h2 class="text-2xl font-bold mb-4" id="device-paths">Device Paths</h2>
1067
+ <p class="text-mountain-300 mb-6">
1068
+ The detector checks platform-specific device paths for hardware time sources.
1069
+ </p>
1070
+
1071
+ <h3 class="text-xl font-bold mb-3">Linux</h3>
1072
+ <div class="bg-mountain-800 rounded-lg p-4 mb-6">
1073
+ <div class="grid gap-3">
1074
+ <div>
1075
+ <span class="text-mountain-400 text-sm">PPS Devices:</span>
1076
+ <div class="flex flex-wrap gap-2 mt-1">
1077
+ <span class="device-path text-green-400">/dev/pps0</span>
1078
+ <span class="device-path text-green-400">/dev/pps1</span>
1079
+ <span class="device-path text-green-400">/dev/pps2</span>
1080
+ </div>
1081
+ </div>
1082
+ <div>
1083
+ <span class="text-mountain-400 text-sm">PTP Devices:</span>
1084
+ <div class="flex flex-wrap gap-2 mt-1">
1085
+ <span class="device-path text-blue-400">/dev/ptp0</span>
1086
+ <span class="device-path text-blue-400">/dev/ptp1</span>
1087
+ <span class="device-path text-blue-400">/dev/ptp2</span>
1088
+ </div>
1089
+ </div>
1090
+ <div>
1091
+ <span class="text-mountain-400 text-sm">GPS Devices:</span>
1092
+ <div class="flex flex-wrap gap-2 mt-1">
1093
+ <span class="device-path text-yellow-400">/dev/ttyUSB0</span>
1094
+ <span class="device-path text-yellow-400">/dev/ttyACM0</span>
1095
+ <span class="device-path text-yellow-400">/dev/gps0</span>
1096
+ </div>
1097
+ </div>
1098
+ <div>
1099
+ <span class="text-mountain-400 text-sm">Chrony Socket:</span>
1100
+ <div class="flex flex-wrap gap-2 mt-1">
1101
+ <span class="device-path text-gray-400">/var/run/chrony/chronyd.sock</span>
1102
+ </div>
1103
+ </div>
1104
+ </div>
1105
+ </div>
1106
+
1107
+ <h3 class="text-xl font-bold mb-3">Windows</h3>
1108
+ <div class="bg-mountain-800 rounded-lg p-4 mb-6">
1109
+ <div class="grid gap-3">
1110
+ <div>
1111
+ <span class="text-mountain-400 text-sm">Time Service:</span>
1112
+ <div class="flex flex-wrap gap-2 mt-1">
1113
+ <span class="device-path text-gray-400">w32tm</span>
1114
+ </div>
1115
+ </div>
1116
+ <div>
1117
+ <span class="text-mountain-400 text-sm">PTP:</span>
1118
+ <span class="text-mountain-500 text-sm ml-2">Requires vendor-specific drivers (Meinberg, etc.)</span>
1119
+ </div>
1120
+ </div>
1121
+ </div>
1122
+
1123
+ <h3 class="text-xl font-bold mb-3">macOS (Darwin)</h3>
1124
+ <div class="bg-mountain-800 rounded-lg p-4 mb-8">
1125
+ <div class="grid gap-3">
1126
+ <div>
1127
+ <span class="text-mountain-400 text-sm">PPS Devices:</span>
1128
+ <div class="flex flex-wrap gap-2 mt-1">
1129
+ <span class="device-path text-green-400">/dev/pps0</span>
1130
+ </div>
1131
+ </div>
1132
+ <div>
1133
+ <span class="text-mountain-400 text-sm">PTP Devices:</span>
1134
+ <div class="flex flex-wrap gap-2 mt-1">
1135
+ <span class="device-path text-blue-400">/dev/ptp0</span>
1136
+ </div>
1137
+ </div>
1138
+ <div>
1139
+ <span class="text-mountain-400 text-sm">GPS Devices:</span>
1140
+ <div class="flex flex-wrap gap-2 mt-1">
1141
+ <span class="device-path text-yellow-400">/dev/cu.usbserial*</span>
1142
+ </div>
1143
+ </div>
1144
+ </div>
1145
+ </div>
1146
+
1147
+ <!-- Detection Methods Section -->
1148
+ <h2 class="text-2xl font-bold mb-4" id="detection-methods">Detection Methods</h2>
1149
+
1150
+ <h3 class="text-xl font-bold mb-3">Atomic Clock Detection</h3>
1151
+ <p class="text-mountain-300 mb-4">
1152
+ The detector identifies atomic clocks through multiple methods:
1153
+ </p>
1154
+ <ul class="list-disc list-inside text-mountain-300 space-y-2 mb-6">
1155
+ <li>Chrony sources reporting <code class="theme-accent">PPS</code> or <code class="theme-accent">ATOM</code> references</li>
1156
+ <li>PPS device names containing: <code class="theme-accent">atomic</code>, <code class="theme-accent">csac</code>, <code class="theme-accent">rubidium</code>, <code class="theme-accent">caesium</code>, <code class="theme-accent">sa.45</code></li>
1157
+ <li>PCIe devices via <code class="theme-accent">lspci</code> matching time/clock/atomic keywords</li>
1158
+ <li>Windows: Jackson Labs CSAC driver processes</li>
1159
+ </ul>
1160
+
1161
+ <h3 class="text-xl font-bold mb-3">GPS Detection</h3>
1162
+ <p class="text-mountain-300 mb-4">
1163
+ GPS receivers are detected via:
1164
+ </p>
1165
+ <ul class="list-disc list-inside text-mountain-300 space-y-2 mb-6">
1166
+ <li><code class="theme-accent">gpsd</code> service status and <code class="theme-accent">gpspipe</code> output</li>
1167
+ <li>Serial devices at standard GPS paths</li>
1168
+ <li>Associated PPS devices for high-precision timing</li>
1169
+ <li>Chrony sources with GPS references</li>
1170
+ </ul>
1171
+
1172
+ <h3 class="text-xl font-bold mb-3">PTP Detection</h3>
1173
+ <p class="text-mountain-300 mb-4">
1174
+ IEEE 1588 PTP synchronization is detected through:
1175
+ </p>
1176
+ <ul class="list-disc list-inside text-mountain-300 space-y-2 mb-6">
1177
+ <li>PTP hardware devices at <code class="theme-accent">/dev/ptpN</code></li>
1178
+ <li><code class="theme-accent">ptp4l</code> service with <code class="theme-accent">pmc</code> queries for offset</li>
1179
+ <li><code class="theme-accent">phc2sys</code> process for PTP-to-system clock sync</li>
1180
+ <li>Meinberg PTP hardware (PTP270PEX) via <code class="theme-accent">lspci</code> and <code class="theme-accent">mbgstatus</code></li>
1181
+ </ul>
1182
+
1183
+ <h3 class="text-xl font-bold mb-3">NTP Detection</h3>
1184
+ <p class="text-mountain-300 mb-4">
1185
+ NTP status is checked via:
1186
+ </p>
1187
+ <ul class="list-disc list-inside text-mountain-300 space-y-2 mb-8">
1188
+ <li><strong>Chrony:</strong> <code class="theme-accent">chronyc tracking</code> for stratum, offset, and server</li>
1189
+ <li><strong>systemd-timesyncd:</strong> <code class="theme-accent">timedatectl show</code></li>
1190
+ <li><strong>ntpd:</strong> <code class="theme-accent">ntpq -p</code> for selected source</li>
1191
+ <li><strong>Windows:</strong> <code class="theme-accent">w32tm /query /status</code></li>
1192
+ <li><strong>macOS:</strong> <code class="theme-accent">sntp</code> queries</li>
1193
+ </ul>
1194
+
1195
+ <!-- Phase Configuration Section -->
1196
+ <h2 class="text-2xl font-bold mb-4" id="phase-config">Phase Configuration</h2>
1197
+ <p class="text-mountain-300 mb-6">
1198
+ Use <code class="bg-mountain-800 px-2 py-1 rounded theme-accent">createPhaseConfig()</code> to generate
1199
+ phase epoch configuration based on detected time source quality.
1200
+ </p>
1201
+
1202
+ <pre class="language-javascript mb-6"><code>import {
1203
+ TimeSourceDetector,
1204
+ createPhaseConfig
1205
+ } from './oracle/time-source.js';
1206
+
1207
+ const detector = new TimeSourceDetector({ detectHardware: true });
1208
+ detector.detect();
1209
+
1210
+ const phaseConfig = createPhaseConfig(detector);
1211
+
1212
+ console.log(phaseConfig);
1213
+ // {
1214
+ // trustLevel: 'atomic',
1215
+ // toleranceMs: 100,
1216
+ // epochDurationHours: 1,
1217
+ // gracePeriodMinutes: 1,
1218
+ // capabilities: {
1219
+ // canBeTimeOracle: true,
1220
+ // canValidateTightPhase: true,
1221
+ // canParticipateInConsensus: true
1222
+ // }
1223
+ // }</code></pre>
1224
+
1225
+ <h3 class="text-xl font-bold mb-3">Capabilities by Trust Level</h3>
1226
+ <div class="overflow-x-auto mb-8">
1227
+ <table class="trust-table rounded-lg overflow-hidden">
1228
+ <thead>
1229
+ <tr>
1230
+ <th>Capability</th>
1231
+ <th>QUANTUM</th>
1232
+ <th>ATOMIC</th>
1233
+ <th>GPS</th>
1234
+ <th>PTP</th>
1235
+ <th>NTP</th>
1236
+ <th>UNSYNC</th>
1237
+ </tr>
1238
+ </thead>
1239
+ <tbody>
1240
+ <tr>
1241
+ <td>Can be Time Oracle</td>
1242
+ <td class="text-green-400">✓</td>
1243
+ <td class="text-green-400">✓</td>
1244
+ <td class="text-red-400">✗</td>
1245
+ <td class="text-red-400">✗</td>
1246
+ <td class="text-red-400">✗</td>
1247
+ <td class="text-red-400">✗</td>
1248
+ </tr>
1249
+ <tr>
1250
+ <td>Validate Tight Phase</td>
1251
+ <td class="text-green-400">✓</td>
1252
+ <td class="text-green-400">✓</td>
1253
+ <td class="text-green-400">✓</td>
1254
+ <td class="text-red-400">✗</td>
1255
+ <td class="text-red-400">✗</td>
1256
+ <td class="text-red-400">✗</td>
1257
+ </tr>
1258
+ <tr>
1259
+ <td>Participate in Consensus</td>
1260
+ <td class="text-green-400">✓</td>
1261
+ <td class="text-green-400">✓</td>
1262
+ <td class="text-green-400">✓</td>
1263
+ <td class="text-green-400">✓</td>
1264
+ <td class="text-green-400">✓</td>
1265
+ <td class="text-red-400">✗</td>
1266
+ </tr>
1267
+ </tbody>
1268
+ </table>
1269
+ </div>
1270
+
1271
+ <!-- Constants Section -->
1272
+ <h2 class="text-2xl font-bold mb-4" id="constants">Exported Constants</h2>
1273
+
1274
+ <h3 class="text-xl font-bold mb-3">TimeTrustLevel</h3>
1275
+ <pre class="language-javascript mb-6"><code>export const TimeTrustLevel = {
1276
+ QUANTUM: 'quantum', // Quantum optical network (WR-PTP, optical atomic)
1277
+ ATOMIC: 'atomic', // PCIe atomic clock (CSAC, Rubidium)
1278
+ GPS: 'gps', // GPS with PPS signal
1279
+ PTP: 'ptp', // IEEE 1588 PTP synchronized
1280
+ NTP: 'ntp', // Standard NTP
1281
+ UNSYNC: 'unsync', // No reliable time source
1282
+ };</code></pre>
1283
+
1284
+ <h3 class="text-xl font-bold mb-3">PhaseTolerance</h3>
1285
+ <pre class="language-javascript mb-6"><code>export const PhaseTolerance = {
1286
+ [TimeTrustLevel.QUANTUM]: 1, // ±1ms for quantum (sub-nanosecond capable)
1287
+ [TimeTrustLevel.ATOMIC]: 100, // ±100ms for atomic
1288
+ [TimeTrustLevel.GPS]: 500, // ±500ms for GPS
1289
+ [TimeTrustLevel.PTP]: 500, // ±500ms for PTP
1290
+ [TimeTrustLevel.NTP]: 5000, // ±5 seconds for NTP
1291
+ [TimeTrustLevel.UNSYNC]: 30000, // ±30 seconds for unsync (degraded mode)
1292
+ };</code></pre>
1293
+
1294
+ <h3 class="text-xl font-bold mb-3">StratumLevel</h3>
1295
+ <pre class="language-javascript mb-8"><code>export const StratumLevel = {
1296
+ [TimeTrustLevel.QUANTUM]: 0, // Quantum reference (highest)
1297
+ [TimeTrustLevel.ATOMIC]: 0, // Reference clock
1298
+ [TimeTrustLevel.GPS]: 1, // Primary server
1299
+ [TimeTrustLevel.PTP]: 1, // Primary server
1300
+ [TimeTrustLevel.NTP]: 2, // Secondary server
1301
+ [TimeTrustLevel.UNSYNC]: 16, // Unsynchronized
1302
+ };</code></pre>
1303
+
1304
+ <!-- Helper Functions Section -->
1305
+ <h2 class="text-2xl font-bold mb-4" id="helpers">Helper Functions</h2>
1306
+
1307
+ <h3 class="text-xl font-bold mb-3">Quick Detection</h3>
1308
+ <pre class="language-javascript mb-6"><code>import { detectTimeSources } from './oracle/time-source.js';
1309
+
1310
+ // One-shot detection without continuous monitoring
1311
+ const results = detectTimeSources();
1312
+ console.log('Detected:', results.primarySource, 'at', results.trustLevel);</code></pre>
1313
+
1314
+ <h3 class="text-xl font-bold mb-3">Singleton Instance</h3>
1315
+ <pre class="language-javascript mb-8"><code>import { getTimeSourceDetector } from './oracle/time-source.js';
1316
+
1317
+ // Get or create the global detector instance
1318
+ const detector = getTimeSourceDetector({ verbose: true });
1319
+ detector.start();
1320
+
1321
+ // Subsequent calls return the same instance
1322
+ const sameDetector = getTimeSourceDetector();
1323
+ console.log(detector === sameDetector); // true</code></pre>
1324
+
1325
+ <!-- Next Steps -->
1326
+ <div class="bg-mountain-800 border theme-border rounded-xl p-6 mt-8">
1327
+ <h3 class="text-lg font-semibold mb-4">Related Documentation</h3>
1328
+ <ul class="space-y-3 text-mountain-300">
1329
+ <li class="flex items-center gap-2">
1330
+ <svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-tattva"/></svg>
1331
+ <a href="tattva.html" class="theme-accent theme-accent-hover">Oracle System</a>
1332
+ <span class="text-mountain-400 text-sm">— Network-wide time consensus</span>
1333
+ </li>
1334
+ <li class="flex items-center gap-2">
1335
+ <svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-mandala"/></svg>
1336
+ <a href="mandala.html" class="theme-accent theme-accent-hover">MANDALA (Mesh)</a>
1337
+ <span class="text-mountain-400 text-sm">— Peer coordination and routing</span>
1338
+ </li>
1339
+ <li class="flex items-center gap-2">
1340
+ <svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-suraksha"/></svg>
1341
+ <a href="trust-security.html" class="theme-accent theme-accent-hover">SURAKSHA</a>
1342
+ <span class="text-mountain-400 text-sm">— Phase-based trust validation</span>
1343
+ </li>
1344
+ <li class="flex items-center gap-2">
1345
+ <svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-gear"/></svg>
1346
+ <a href="configuration.html" class="theme-accent theme-accent-hover">Configuration</a>
1347
+ <span class="text-mountain-400 text-sm">— Time source configuration options</span>
1348
+ </li>
1349
+ </ul>
1350
+ </div>
1351
+
1352
+ <!-- Journey Navigation -->
1353
+ <div class="border-t border-mountain-700 mt-12 pt-8">
1354
+ <h2 class="text-xl font-bold mb-6">Continue the Journey</h2>
1355
+ <div class="flex flex-col sm:flex-row gap-4">
1356
+ <a href="mesh.html" class="flex-1 block bg-mountain-800 border border-mountain-700 rounded-xl p-4 hover:border-theme-accent transition group">
1357
+ <div class="text-xs text-mountain-400 mb-1">← Previous</div>
1358
+ <div class="flex items-center gap-2">
1359
+ <svg class="doc-icon journey-icon" aria-hidden="true"><use href="#icon-mandala"/></svg>
1360
+ <span class="font-semibold group-hover:text-theme-accent">Mesh Network</span>
1361
+ </div>
1362
+ <p class="text-mountain-400 text-sm mt-1">P2P mesh infrastructure</p>
1363
+ </a>
1364
+ <a href="webserver.html" class="flex-1 block bg-mountain-800 border border-theme-primary rounded-xl p-4 hover:border-theme-accent transition group">
1365
+ <div class="text-xs text-mountain-400 mb-1">Next →</div>
1366
+ <div class="flex items-center gap-2">
1367
+ <svg class="doc-icon journey-icon" aria-hidden="true"><use href="#icon-server"/></svg>
1368
+ <span class="font-semibold group-hover:text-theme-accent">Web Server</span>
1369
+ </div>
1370
+ <p class="text-mountain-400 text-sm mt-1">HTTP & WebSocket server</p>
1371
+ </a>
1372
+ </div>
1373
+ </div>
1374
+ </main>
1375
+
1376
+ <footer class="docs-footer">
1377
+ <p>© 2026 YAKMESH™</p>
1378
+ </footer><!-- Scripts -->
1379
+ <script src="prism.min.js" defer></script>
1380
+ <script src="prism-javascript.min.js" defer></script>
1381
+ <script src="prism-bash.min.js" defer></script>
1382
+ <script src="prism-json.min.js" defer></script>
1383
+ <script src="docs.js" defer></script>
1384
+
1385
+
1386
+ </body>
1387
+ </html>
1388
+
1389
+
1390
+
1391
+
1392
+