@silicaclaw/cli 2026.3.19-9 → 2026.3.20-10

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 (331) hide show
  1. package/CHANGELOG.md +182 -0
  2. package/DEMO_GUIDE.md +1 -1
  3. package/INSTALL.md +53 -13
  4. package/README.md +106 -23
  5. package/VERSION +1 -1
  6. package/apps/local-console/dist/apps/local-console/src/server.d.ts +180 -14
  7. package/apps/local-console/dist/apps/local-console/src/server.js +1499 -267
  8. package/apps/local-console/dist/config/silicaclaw-defaults.json +19 -0
  9. package/apps/local-console/dist/packages/core/src/index.d.ts +2 -0
  10. package/apps/local-console/dist/packages/core/src/index.js +2 -0
  11. package/apps/local-console/dist/packages/core/src/privateCrypto.d.ts +17 -0
  12. package/apps/local-console/dist/packages/core/src/privateCrypto.js +40 -0
  13. package/apps/local-console/dist/packages/core/src/privateMessage.d.ts +23 -0
  14. package/apps/local-console/dist/packages/core/src/privateMessage.js +74 -0
  15. package/apps/local-console/dist/packages/core/src/profile.js +2 -0
  16. package/apps/local-console/dist/packages/core/src/publicProfileSummary.d.ts +4 -0
  17. package/apps/local-console/dist/packages/core/src/publicProfileSummary.js +3 -0
  18. package/apps/local-console/dist/packages/core/src/socialConfig.js +9 -5
  19. package/apps/local-console/dist/packages/core/src/types.d.ts +40 -0
  20. package/apps/local-console/dist/packages/network/src/realPreview.js +6 -2
  21. package/apps/local-console/dist/packages/network/src/relayPreview.d.ts +12 -0
  22. package/apps/local-console/dist/packages/network/src/relayPreview.js +116 -10
  23. package/apps/local-console/dist/packages/network/src/transport/udpLanBroadcastTransport.js +2 -1
  24. package/apps/local-console/dist/packages/network/src/types.d.ts +4 -0
  25. package/apps/local-console/dist/packages/network/src/webrtcPreview.js +5 -1
  26. package/apps/local-console/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
  27. package/apps/local-console/dist/packages/storage/src/repos.d.ts +13 -1
  28. package/apps/local-console/dist/packages/storage/src/repos.js +19 -1
  29. package/apps/local-console/dist/packages/storage/src/socialRuntimeRepo.js +8 -4
  30. package/apps/local-console/public/app/app.js +486 -12
  31. package/apps/local-console/public/app/events.js +61 -2
  32. package/apps/local-console/public/app/network.js +176 -35
  33. package/apps/local-console/public/app/overview.js +75 -53
  34. package/apps/local-console/public/app/shell.js +18 -34
  35. package/apps/local-console/public/app/social.js +495 -93
  36. package/apps/local-console/public/app/styles.css +309 -15
  37. package/apps/local-console/public/app/template.js +182 -51
  38. package/apps/local-console/public/app/translations.js +476 -266
  39. package/apps/local-console/src/server.ts +1669 -271
  40. package/apps/public-explorer/dist/apps/public-explorer/src/server.d.ts +1 -0
  41. package/apps/public-explorer/dist/apps/public-explorer/src/server.js +41 -0
  42. package/apps/public-explorer/dist/config/silicaclaw-defaults.json +19 -0
  43. package/apps/public-explorer/public/app/app.js +22 -2
  44. package/apps/public-explorer/public/app/template.js +4 -4
  45. package/apps/public-explorer/public/app/translations.js +29 -29
  46. package/apps/public-explorer/src/server.ts +11 -1
  47. package/config/silicaclaw-defaults.json +19 -0
  48. package/dist/apps/local-console/src/server.d.ts +1 -0
  49. package/dist/apps/local-console/src/server.js +555 -0
  50. package/docs/NEW_USER_INSTALL.md +14 -10
  51. package/docs/NEW_USER_OPERATIONS.md +9 -9
  52. package/docs/OPENCLAW_BRIDGE.md +22 -7
  53. package/docs/OPENCLAW_BRIDGE_ZH.md +21 -6
  54. package/docs/RELEASE_CHECKLIST.md +95 -0
  55. package/node_modules/@silicaclaw/core/dist/config/silicaclaw-defaults.json +19 -0
  56. package/node_modules/@silicaclaw/core/dist/packages/core/src/crypto.d.ts +6 -0
  57. package/node_modules/@silicaclaw/core/dist/packages/core/src/crypto.js +50 -0
  58. package/node_modules/@silicaclaw/core/dist/packages/core/src/directory.d.ts +17 -0
  59. package/node_modules/@silicaclaw/core/dist/packages/core/src/directory.js +145 -0
  60. package/node_modules/@silicaclaw/core/dist/packages/core/src/identity.d.ts +2 -0
  61. package/node_modules/@silicaclaw/core/dist/packages/core/src/identity.js +18 -0
  62. package/node_modules/@silicaclaw/core/dist/packages/core/src/index.d.ts +14 -0
  63. package/node_modules/@silicaclaw/core/dist/packages/core/src/index.js +30 -0
  64. package/node_modules/@silicaclaw/core/dist/packages/core/src/indexing.d.ts +6 -0
  65. package/node_modules/@silicaclaw/core/dist/packages/core/src/indexing.js +43 -0
  66. package/node_modules/@silicaclaw/core/dist/packages/core/src/presence.d.ts +4 -0
  67. package/node_modules/@silicaclaw/core/dist/packages/core/src/presence.js +23 -0
  68. package/node_modules/@silicaclaw/core/dist/packages/core/src/privateCrypto.d.ts +17 -0
  69. package/node_modules/@silicaclaw/core/dist/packages/core/src/privateCrypto.js +40 -0
  70. package/node_modules/@silicaclaw/core/dist/packages/core/src/privateMessage.d.ts +23 -0
  71. package/node_modules/@silicaclaw/core/dist/packages/core/src/privateMessage.js +74 -0
  72. package/node_modules/@silicaclaw/core/dist/packages/core/src/profile.d.ts +4 -0
  73. package/node_modules/@silicaclaw/core/dist/packages/core/src/profile.js +41 -0
  74. package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
  75. package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.js +106 -0
  76. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialConfig.d.ts +100 -0
  77. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialConfig.js +300 -0
  78. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialMessage.d.ts +19 -0
  79. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialMessage.js +69 -0
  80. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialResolver.d.ts +46 -0
  81. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialResolver.js +237 -0
  82. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialTemplate.d.ts +2 -0
  83. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialTemplate.js +90 -0
  84. package/node_modules/@silicaclaw/core/dist/packages/core/src/types.d.ts +99 -0
  85. package/node_modules/@silicaclaw/core/dist/packages/core/src/types.js +2 -0
  86. package/node_modules/@silicaclaw/core/src/index.ts +2 -0
  87. package/node_modules/@silicaclaw/core/src/privateCrypto.ts +57 -0
  88. package/node_modules/@silicaclaw/core/src/privateMessage.ts +101 -0
  89. package/node_modules/@silicaclaw/core/src/profile.ts +2 -0
  90. package/node_modules/@silicaclaw/core/src/publicProfileSummary.ts +7 -0
  91. package/node_modules/@silicaclaw/core/src/socialConfig.ts +7 -5
  92. package/node_modules/@silicaclaw/core/src/types.ts +44 -0
  93. package/node_modules/@silicaclaw/network/dist/config/silicaclaw-defaults.json +19 -0
  94. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/messageEnvelope.d.ts +28 -0
  95. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/messageEnvelope.js +36 -0
  96. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/peerDiscovery.d.ts +43 -0
  97. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/peerDiscovery.js +2 -0
  98. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/topicCodec.d.ts +4 -0
  99. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/topicCodec.js +2 -0
  100. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/transport.d.ts +36 -0
  101. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/transport.js +2 -0
  102. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.d.ts +5 -0
  103. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.js +24 -0
  104. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonTopicCodec.d.ts +5 -0
  105. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonTopicCodec.js +12 -0
  106. package/node_modules/@silicaclaw/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.d.ts +28 -0
  107. package/node_modules/@silicaclaw/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.js +144 -0
  108. package/node_modules/@silicaclaw/network/dist/packages/network/src/index.d.ts +14 -0
  109. package/node_modules/@silicaclaw/network/dist/packages/network/src/index.js +30 -0
  110. package/node_modules/@silicaclaw/network/dist/packages/network/src/localEventBus.d.ts +9 -0
  111. package/node_modules/@silicaclaw/network/dist/packages/network/src/localEventBus.js +47 -0
  112. package/node_modules/@silicaclaw/network/dist/packages/network/src/mock.d.ts +8 -0
  113. package/node_modules/@silicaclaw/network/dist/packages/network/src/mock.js +24 -0
  114. package/node_modules/@silicaclaw/network/dist/packages/network/src/realPreview.d.ts +105 -0
  115. package/node_modules/@silicaclaw/network/dist/packages/network/src/realPreview.js +331 -0
  116. package/node_modules/@silicaclaw/network/dist/packages/network/src/relayPreview.d.ts +178 -0
  117. package/node_modules/@silicaclaw/network/dist/packages/network/src/relayPreview.js +548 -0
  118. package/node_modules/@silicaclaw/network/dist/packages/network/src/transport/udpLanBroadcastTransport.d.ts +23 -0
  119. package/node_modules/@silicaclaw/network/dist/packages/network/src/transport/udpLanBroadcastTransport.js +154 -0
  120. package/node_modules/@silicaclaw/network/dist/packages/network/src/types.d.ts +10 -0
  121. package/node_modules/@silicaclaw/network/dist/packages/network/src/types.js +2 -0
  122. package/node_modules/@silicaclaw/network/dist/packages/network/src/webrtcPreview.d.ts +163 -0
  123. package/node_modules/@silicaclaw/network/dist/packages/network/src/webrtcPreview.js +848 -0
  124. package/node_modules/@silicaclaw/network/src/realPreview.ts +3 -2
  125. package/node_modules/@silicaclaw/network/src/relayPreview.ts +125 -12
  126. package/node_modules/@silicaclaw/network/src/transport/udpLanBroadcastTransport.ts +2 -1
  127. package/node_modules/@silicaclaw/network/src/types.ts +2 -0
  128. package/node_modules/@silicaclaw/network/src/webrtcPreview.ts +2 -1
  129. package/node_modules/@silicaclaw/storage/config/silicaclaw-defaults.json +19 -0
  130. package/node_modules/@silicaclaw/storage/dist/config/silicaclaw-defaults.json +19 -0
  131. package/node_modules/@silicaclaw/storage/dist/packages/core/src/crypto.d.ts +6 -0
  132. package/node_modules/@silicaclaw/storage/dist/packages/core/src/crypto.js +50 -0
  133. package/node_modules/@silicaclaw/storage/dist/packages/core/src/directory.d.ts +17 -0
  134. package/node_modules/@silicaclaw/storage/dist/packages/core/src/directory.js +145 -0
  135. package/node_modules/@silicaclaw/storage/dist/packages/core/src/identity.d.ts +2 -0
  136. package/node_modules/@silicaclaw/storage/dist/packages/core/src/identity.js +18 -0
  137. package/node_modules/@silicaclaw/storage/dist/packages/core/src/index.d.ts +14 -0
  138. package/node_modules/@silicaclaw/storage/dist/packages/core/src/index.js +30 -0
  139. package/node_modules/@silicaclaw/storage/dist/packages/core/src/indexing.d.ts +6 -0
  140. package/node_modules/@silicaclaw/storage/dist/packages/core/src/indexing.js +43 -0
  141. package/node_modules/@silicaclaw/storage/dist/packages/core/src/presence.d.ts +4 -0
  142. package/node_modules/@silicaclaw/storage/dist/packages/core/src/presence.js +23 -0
  143. package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateCrypto.d.ts +17 -0
  144. package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateCrypto.js +40 -0
  145. package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateMessage.d.ts +23 -0
  146. package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateMessage.js +74 -0
  147. package/node_modules/@silicaclaw/storage/dist/packages/core/src/profile.d.ts +4 -0
  148. package/node_modules/@silicaclaw/storage/dist/packages/core/src/profile.js +41 -0
  149. package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
  150. package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.js +106 -0
  151. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialConfig.d.ts +100 -0
  152. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialConfig.js +300 -0
  153. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialMessage.d.ts +19 -0
  154. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialMessage.js +69 -0
  155. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialResolver.d.ts +46 -0
  156. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialResolver.js +237 -0
  157. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialTemplate.d.ts +2 -0
  158. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialTemplate.js +90 -0
  159. package/node_modules/@silicaclaw/storage/dist/packages/core/src/types.d.ts +99 -0
  160. package/node_modules/@silicaclaw/storage/dist/packages/core/src/types.js +2 -0
  161. package/node_modules/@silicaclaw/storage/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
  162. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/index.d.ts +3 -0
  163. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/index.js +19 -0
  164. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/jsonRepo.d.ts +7 -0
  165. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/jsonRepo.js +29 -0
  166. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/repos.d.ts +73 -0
  167. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/repos.js +85 -0
  168. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/socialRuntimeRepo.d.ts +5 -0
  169. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/socialRuntimeRepo.js +57 -0
  170. package/node_modules/@silicaclaw/storage/dist/socialRuntimeRepo.js +8 -4
  171. package/node_modules/@silicaclaw/storage/src/repos.ts +31 -1
  172. package/node_modules/@silicaclaw/storage/src/socialRuntimeRepo.ts +5 -4
  173. package/node_modules/@silicaclaw/storage/tsconfig.json +1 -6
  174. package/openclaw-skills/silicaclaw-bridge-setup/SKILL.md +165 -0
  175. package/openclaw-skills/silicaclaw-bridge-setup/VERSION +1 -0
  176. package/openclaw-skills/silicaclaw-bridge-setup/agents/openai.yaml +6 -0
  177. package/openclaw-skills/silicaclaw-bridge-setup/manifest.json +27 -0
  178. package/openclaw-skills/silicaclaw-bridge-setup/references/owner-dialogue-cheatsheet-zh.md +58 -0
  179. package/openclaw-skills/silicaclaw-bridge-setup/references/runtime-setup.md +43 -0
  180. package/openclaw-skills/silicaclaw-bridge-setup/references/troubleshooting.md +24 -0
  181. package/openclaw-skills/silicaclaw-broadcast/SKILL.md +150 -0
  182. package/openclaw-skills/silicaclaw-broadcast/VERSION +1 -1
  183. package/openclaw-skills/silicaclaw-broadcast/agents/openai.yaml +2 -2
  184. package/openclaw-skills/silicaclaw-broadcast/manifest.json +4 -3
  185. package/openclaw-skills/silicaclaw-broadcast/references/owner-dialogue-cheatsheet-zh.md +81 -0
  186. package/openclaw-skills/silicaclaw-network-config/SKILL.md +158 -0
  187. package/openclaw-skills/silicaclaw-network-config/VERSION +1 -0
  188. package/openclaw-skills/silicaclaw-network-config/agents/openai.yaml +6 -0
  189. package/openclaw-skills/silicaclaw-network-config/manifest.json +27 -0
  190. package/openclaw-skills/silicaclaw-network-config/references/network-modes.md +22 -0
  191. package/openclaw-skills/silicaclaw-network-config/references/owner-dialogue-cheatsheet-zh.md +47 -0
  192. package/openclaw-skills/silicaclaw-network-config/references/public-discovery.md +22 -0
  193. package/openclaw-skills/silicaclaw-owner-push/SKILL.md +235 -0
  194. package/openclaw-skills/silicaclaw-owner-push/VERSION +1 -0
  195. package/openclaw-skills/silicaclaw-owner-push/agents/openai.yaml +6 -0
  196. package/openclaw-skills/silicaclaw-owner-push/manifest.json +30 -0
  197. package/openclaw-skills/silicaclaw-owner-push/references/owner-dialogue-cheatsheet-zh.md +87 -0
  198. package/openclaw-skills/silicaclaw-owner-push/references/push-routing-policy.md +43 -0
  199. package/openclaw-skills/silicaclaw-owner-push/references/runtime-setup.md +44 -0
  200. package/openclaw-skills/silicaclaw-owner-push/scripts/owner-push-forwarder.mjs +356 -0
  201. package/openclaw-skills/silicaclaw-owner-push/scripts/send-to-owner-via-openclaw.mjs +69 -0
  202. package/package.json +5 -1
  203. package/packages/core/dist/config/silicaclaw-defaults.json +19 -0
  204. package/packages/core/dist/packages/core/src/crypto.d.ts +6 -0
  205. package/packages/core/dist/packages/core/src/crypto.js +50 -0
  206. package/packages/core/dist/packages/core/src/directory.d.ts +17 -0
  207. package/packages/core/dist/packages/core/src/directory.js +145 -0
  208. package/packages/core/dist/packages/core/src/identity.d.ts +2 -0
  209. package/packages/core/dist/packages/core/src/identity.js +18 -0
  210. package/packages/core/dist/packages/core/src/index.d.ts +14 -0
  211. package/packages/core/dist/packages/core/src/index.js +30 -0
  212. package/packages/core/dist/packages/core/src/indexing.d.ts +6 -0
  213. package/packages/core/dist/packages/core/src/indexing.js +43 -0
  214. package/packages/core/dist/packages/core/src/presence.d.ts +4 -0
  215. package/packages/core/dist/packages/core/src/presence.js +23 -0
  216. package/packages/core/dist/packages/core/src/privateCrypto.d.ts +17 -0
  217. package/packages/core/dist/packages/core/src/privateCrypto.js +40 -0
  218. package/packages/core/dist/packages/core/src/privateMessage.d.ts +23 -0
  219. package/packages/core/dist/packages/core/src/privateMessage.js +74 -0
  220. package/packages/core/dist/packages/core/src/profile.d.ts +4 -0
  221. package/packages/core/dist/packages/core/src/profile.js +41 -0
  222. package/packages/core/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
  223. package/packages/core/dist/packages/core/src/publicProfileSummary.js +106 -0
  224. package/packages/core/dist/packages/core/src/socialConfig.d.ts +100 -0
  225. package/packages/core/dist/packages/core/src/socialConfig.js +300 -0
  226. package/packages/core/dist/packages/core/src/socialMessage.d.ts +19 -0
  227. package/packages/core/dist/packages/core/src/socialMessage.js +69 -0
  228. package/packages/core/dist/packages/core/src/socialResolver.d.ts +46 -0
  229. package/packages/core/dist/packages/core/src/socialResolver.js +237 -0
  230. package/packages/core/dist/packages/core/src/socialTemplate.d.ts +2 -0
  231. package/packages/core/dist/packages/core/src/socialTemplate.js +90 -0
  232. package/packages/core/dist/packages/core/src/types.d.ts +99 -0
  233. package/packages/core/dist/packages/core/src/types.js +2 -0
  234. package/packages/core/src/index.ts +2 -0
  235. package/packages/core/src/privateCrypto.ts +57 -0
  236. package/packages/core/src/privateMessage.ts +101 -0
  237. package/packages/core/src/profile.ts +2 -0
  238. package/packages/core/src/publicProfileSummary.ts +7 -0
  239. package/packages/core/src/socialConfig.ts +7 -5
  240. package/packages/core/src/types.ts +44 -0
  241. package/packages/network/dist/config/silicaclaw-defaults.json +19 -0
  242. package/packages/network/dist/packages/network/src/abstractions/messageEnvelope.d.ts +28 -0
  243. package/packages/network/dist/packages/network/src/abstractions/messageEnvelope.js +36 -0
  244. package/packages/network/dist/packages/network/src/abstractions/peerDiscovery.d.ts +43 -0
  245. package/packages/network/dist/packages/network/src/abstractions/peerDiscovery.js +2 -0
  246. package/packages/network/dist/packages/network/src/abstractions/topicCodec.d.ts +4 -0
  247. package/packages/network/dist/packages/network/src/abstractions/topicCodec.js +2 -0
  248. package/packages/network/dist/packages/network/src/abstractions/transport.d.ts +36 -0
  249. package/packages/network/dist/packages/network/src/abstractions/transport.js +2 -0
  250. package/packages/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.d.ts +5 -0
  251. package/packages/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.js +24 -0
  252. package/packages/network/dist/packages/network/src/codec/jsonTopicCodec.d.ts +5 -0
  253. package/packages/network/dist/packages/network/src/codec/jsonTopicCodec.js +12 -0
  254. package/packages/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.d.ts +28 -0
  255. package/packages/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.js +144 -0
  256. package/packages/network/dist/packages/network/src/index.d.ts +14 -0
  257. package/packages/network/dist/packages/network/src/index.js +30 -0
  258. package/packages/network/dist/packages/network/src/localEventBus.d.ts +9 -0
  259. package/packages/network/dist/packages/network/src/localEventBus.js +47 -0
  260. package/packages/network/dist/packages/network/src/mock.d.ts +8 -0
  261. package/packages/network/dist/packages/network/src/mock.js +24 -0
  262. package/packages/network/dist/packages/network/src/realPreview.d.ts +105 -0
  263. package/packages/network/dist/packages/network/src/realPreview.js +331 -0
  264. package/packages/network/dist/packages/network/src/relayPreview.d.ts +178 -0
  265. package/packages/network/dist/packages/network/src/relayPreview.js +548 -0
  266. package/packages/network/dist/packages/network/src/transport/udpLanBroadcastTransport.d.ts +23 -0
  267. package/packages/network/dist/packages/network/src/transport/udpLanBroadcastTransport.js +154 -0
  268. package/packages/network/dist/packages/network/src/types.d.ts +10 -0
  269. package/packages/network/dist/packages/network/src/types.js +2 -0
  270. package/packages/network/dist/packages/network/src/webrtcPreview.d.ts +163 -0
  271. package/packages/network/dist/packages/network/src/webrtcPreview.js +848 -0
  272. package/packages/network/src/realPreview.ts +3 -2
  273. package/packages/network/src/relayPreview.ts +125 -12
  274. package/packages/network/src/transport/udpLanBroadcastTransport.ts +2 -1
  275. package/packages/network/src/types.ts +2 -0
  276. package/packages/network/src/webrtcPreview.ts +2 -1
  277. package/packages/storage/config/silicaclaw-defaults.json +19 -0
  278. package/packages/storage/dist/config/silicaclaw-defaults.json +19 -0
  279. package/packages/storage/dist/packages/core/src/crypto.d.ts +6 -0
  280. package/packages/storage/dist/packages/core/src/crypto.js +50 -0
  281. package/packages/storage/dist/packages/core/src/directory.d.ts +17 -0
  282. package/packages/storage/dist/packages/core/src/directory.js +145 -0
  283. package/packages/storage/dist/packages/core/src/identity.d.ts +2 -0
  284. package/packages/storage/dist/packages/core/src/identity.js +18 -0
  285. package/packages/storage/dist/packages/core/src/index.d.ts +14 -0
  286. package/packages/storage/dist/packages/core/src/index.js +30 -0
  287. package/packages/storage/dist/packages/core/src/indexing.d.ts +6 -0
  288. package/packages/storage/dist/packages/core/src/indexing.js +43 -0
  289. package/packages/storage/dist/packages/core/src/presence.d.ts +4 -0
  290. package/packages/storage/dist/packages/core/src/presence.js +23 -0
  291. package/packages/storage/dist/packages/core/src/privateCrypto.d.ts +17 -0
  292. package/packages/storage/dist/packages/core/src/privateCrypto.js +40 -0
  293. package/packages/storage/dist/packages/core/src/privateMessage.d.ts +23 -0
  294. package/packages/storage/dist/packages/core/src/privateMessage.js +74 -0
  295. package/packages/storage/dist/packages/core/src/profile.d.ts +4 -0
  296. package/packages/storage/dist/packages/core/src/profile.js +41 -0
  297. package/packages/storage/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
  298. package/packages/storage/dist/packages/core/src/publicProfileSummary.js +106 -0
  299. package/packages/storage/dist/packages/core/src/socialConfig.d.ts +100 -0
  300. package/packages/storage/dist/packages/core/src/socialConfig.js +300 -0
  301. package/packages/storage/dist/packages/core/src/socialMessage.d.ts +19 -0
  302. package/packages/storage/dist/packages/core/src/socialMessage.js +69 -0
  303. package/packages/storage/dist/packages/core/src/socialResolver.d.ts +46 -0
  304. package/packages/storage/dist/packages/core/src/socialResolver.js +237 -0
  305. package/packages/storage/dist/packages/core/src/socialTemplate.d.ts +2 -0
  306. package/packages/storage/dist/packages/core/src/socialTemplate.js +90 -0
  307. package/packages/storage/dist/packages/core/src/types.d.ts +99 -0
  308. package/packages/storage/dist/packages/core/src/types.js +2 -0
  309. package/packages/storage/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
  310. package/packages/storage/dist/packages/storage/src/index.d.ts +3 -0
  311. package/packages/storage/dist/packages/storage/src/index.js +19 -0
  312. package/packages/storage/dist/packages/storage/src/jsonRepo.d.ts +7 -0
  313. package/packages/storage/dist/packages/storage/src/jsonRepo.js +29 -0
  314. package/packages/storage/dist/packages/storage/src/repos.d.ts +73 -0
  315. package/packages/storage/dist/packages/storage/src/repos.js +85 -0
  316. package/packages/storage/dist/packages/storage/src/socialRuntimeRepo.d.ts +5 -0
  317. package/packages/storage/dist/packages/storage/src/socialRuntimeRepo.js +57 -0
  318. package/packages/storage/dist/socialRuntimeRepo.js +8 -4
  319. package/packages/storage/src/repos.ts +31 -1
  320. package/packages/storage/src/socialRuntimeRepo.ts +5 -4
  321. package/packages/storage/tsconfig.json +1 -6
  322. package/scripts/functional-check.mjs +35 -6
  323. package/scripts/install-openclaw-skill.mjs +9 -2
  324. package/scripts/openclaw-bridge-adapter.mjs +3 -1
  325. package/scripts/openclaw-bridge-client.mjs +3 -1
  326. package/scripts/openclaw-runtime-demo.mjs +3 -1
  327. package/scripts/quickstart.sh +14 -10
  328. package/scripts/release-pack.mjs +59 -1
  329. package/scripts/silicaclaw-cli.mjs +166 -51
  330. package/scripts/silicaclaw-gateway.mjs +410 -84
  331. package/scripts/validate-openclaw-skill.mjs +98 -21
@@ -0,0 +1,105 @@
1
+ import { NetworkAdapter } from "./types";
2
+ import { MessageEnvelopeCodec } from "./abstractions/messageEnvelope";
3
+ import { TopicCodec } from "./abstractions/topicCodec";
4
+ import { NetworkTransport } from "./abstractions/transport";
5
+ import { PeerDiscovery, PeerSnapshot } from "./abstractions/peerDiscovery";
6
+ type RealNetworkAdapterPreviewOptions = {
7
+ peerId?: string;
8
+ namespace?: string;
9
+ transport?: NetworkTransport;
10
+ envelopeCodec?: MessageEnvelopeCodec;
11
+ topicCodec?: TopicCodec;
12
+ peerDiscovery?: PeerDiscovery;
13
+ maxMessageBytes?: number;
14
+ dedupeWindowMs?: number;
15
+ dedupeMaxEntries?: number;
16
+ maxFutureDriftMs?: number;
17
+ maxPastDriftMs?: number;
18
+ };
19
+ type NetworkDiagnostics = {
20
+ adapter: string;
21
+ peer_id: string;
22
+ namespace: string;
23
+ components: {
24
+ transport: string;
25
+ discovery: string;
26
+ envelope_codec: string;
27
+ topic_codec: string;
28
+ };
29
+ limits: {
30
+ max_message_bytes: number;
31
+ dedupe_window_ms: number;
32
+ dedupe_max_entries: number;
33
+ max_future_drift_ms: number;
34
+ max_past_drift_ms: number;
35
+ };
36
+ config: {
37
+ started: boolean;
38
+ topic_handler_count: number;
39
+ transport: ReturnType<NonNullable<NetworkTransport["getConfig"]>> | null;
40
+ discovery: ReturnType<NonNullable<PeerDiscovery["getConfig"]>> | null;
41
+ };
42
+ peers: {
43
+ total: number;
44
+ online: number;
45
+ stale: number;
46
+ items: PeerSnapshot[];
47
+ };
48
+ stats: {
49
+ publish_attempted: number;
50
+ publish_sent: number;
51
+ received_total: number;
52
+ delivered_total: number;
53
+ dropped_duplicate: number;
54
+ dropped_self: number;
55
+ dropped_malformed: number;
56
+ dropped_oversized: number;
57
+ dropped_namespace_mismatch: number;
58
+ dropped_timestamp_future_drift: number;
59
+ dropped_timestamp_past_drift: number;
60
+ dropped_decode_failed: number;
61
+ dropped_topic_decode_error: number;
62
+ dropped_handler_error: number;
63
+ send_errors: number;
64
+ discovery_errors: number;
65
+ start_errors: number;
66
+ stop_errors: number;
67
+ received_validated: number;
68
+ };
69
+ transport_stats: ReturnType<NonNullable<NetworkTransport["getStats"]>> | null;
70
+ discovery_stats: ReturnType<NonNullable<PeerDiscovery["getStats"]>> | null;
71
+ };
72
+ export declare class RealNetworkAdapterPreview implements NetworkAdapter {
73
+ private started;
74
+ private peerId;
75
+ private namespace;
76
+ private transport;
77
+ private envelopeCodec;
78
+ private topicCodec;
79
+ private peerDiscovery;
80
+ private maxMessageBytes;
81
+ private dedupeWindowMs;
82
+ private dedupeMaxEntries;
83
+ private maxFutureDriftMs;
84
+ private maxPastDriftMs;
85
+ private seenMessageIds;
86
+ private offTransportMessage;
87
+ private handlers;
88
+ private stats;
89
+ constructor(options?: RealNetworkAdapterPreviewOptions);
90
+ start(): Promise<void>;
91
+ stop(): Promise<void>;
92
+ publish(topic: string, data: any): Promise<void>;
93
+ subscribe(topic: string, handler: (data: any) => void): void;
94
+ listPeers(): PeerSnapshot[];
95
+ getDiagnostics(): NetworkDiagnostics;
96
+ private onTransportMessage;
97
+ private topicKey;
98
+ private stripNamespace;
99
+ private isDuplicateMessage;
100
+ private cleanupSeenMessageIds;
101
+ private isValidTopic;
102
+ private normalizeNamespace;
103
+ private errorMessage;
104
+ }
105
+ export {};
@@ -0,0 +1,331 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RealNetworkAdapterPreview = void 0;
7
+ const crypto_1 = require("crypto");
8
+ const messageEnvelope_1 = require("./abstractions/messageEnvelope");
9
+ const jsonMessageEnvelopeCodec_1 = require("./codec/jsonMessageEnvelopeCodec");
10
+ const jsonTopicCodec_1 = require("./codec/jsonTopicCodec");
11
+ const udpLanBroadcastTransport_1 = require("./transport/udpLanBroadcastTransport");
12
+ const heartbeatPeerDiscovery_1 = require("./discovery/heartbeatPeerDiscovery");
13
+ const silicaclaw_defaults_json_1 = __importDefault(require("../../../config/silicaclaw-defaults.json"));
14
+ class RealNetworkAdapterPreview {
15
+ started = false;
16
+ peerId;
17
+ namespace;
18
+ transport;
19
+ envelopeCodec;
20
+ topicCodec;
21
+ peerDiscovery;
22
+ maxMessageBytes;
23
+ dedupeWindowMs;
24
+ dedupeMaxEntries;
25
+ maxFutureDriftMs;
26
+ maxPastDriftMs;
27
+ seenMessageIds = new Map();
28
+ offTransportMessage = null;
29
+ handlers = new Map();
30
+ stats = {
31
+ publish_attempted: 0,
32
+ publish_sent: 0,
33
+ received_total: 0,
34
+ delivered_total: 0,
35
+ dropped_duplicate: 0,
36
+ dropped_self: 0,
37
+ dropped_malformed: 0,
38
+ dropped_oversized: 0,
39
+ dropped_namespace_mismatch: 0,
40
+ dropped_timestamp_future_drift: 0,
41
+ dropped_timestamp_past_drift: 0,
42
+ dropped_decode_failed: 0,
43
+ dropped_topic_decode_error: 0,
44
+ dropped_handler_error: 0,
45
+ send_errors: 0,
46
+ discovery_errors: 0,
47
+ start_errors: 0,
48
+ stop_errors: 0,
49
+ received_validated: 0,
50
+ };
51
+ constructor(options = {}) {
52
+ this.peerId = options.peerId ?? `peer-${process.pid}-${Math.random().toString(36).slice(2, 10)}`;
53
+ this.namespace = this.normalizeNamespace(options.namespace ?? silicaclaw_defaults_json_1.default.network.default_namespace);
54
+ this.transport = options.transport ?? new udpLanBroadcastTransport_1.UdpLanBroadcastTransport();
55
+ this.envelopeCodec = options.envelopeCodec ?? new jsonMessageEnvelopeCodec_1.JsonMessageEnvelopeCodec();
56
+ this.topicCodec = options.topicCodec ?? new jsonTopicCodec_1.JsonTopicCodec();
57
+ this.peerDiscovery = options.peerDiscovery ?? new heartbeatPeerDiscovery_1.HeartbeatPeerDiscovery();
58
+ this.maxMessageBytes = options.maxMessageBytes ?? 64 * 1024;
59
+ this.dedupeWindowMs = options.dedupeWindowMs ?? 90_000;
60
+ this.dedupeMaxEntries = options.dedupeMaxEntries ?? 10_000;
61
+ this.maxFutureDriftMs = options.maxFutureDriftMs ?? 30_000;
62
+ this.maxPastDriftMs = options.maxPastDriftMs ?? 120_000;
63
+ }
64
+ async start() {
65
+ if (this.started) {
66
+ return;
67
+ }
68
+ try {
69
+ await this.transport.start();
70
+ }
71
+ catch (error) {
72
+ this.stats.start_errors += 1;
73
+ throw new Error(`Transport start failed: ${this.errorMessage(error)}`);
74
+ }
75
+ this.started = true;
76
+ this.offTransportMessage = this.transport.onMessage((raw) => {
77
+ this.onTransportMessage(raw);
78
+ });
79
+ try {
80
+ await this.peerDiscovery.start({
81
+ self_peer_id: this.peerId,
82
+ publishControl: async (topic, payload) => {
83
+ await this.publish(topic, payload);
84
+ },
85
+ });
86
+ }
87
+ catch (error) {
88
+ this.stats.start_errors += 1;
89
+ this.started = false;
90
+ if (this.offTransportMessage) {
91
+ this.offTransportMessage();
92
+ this.offTransportMessage = null;
93
+ }
94
+ try {
95
+ await this.transport.stop();
96
+ }
97
+ catch {
98
+ this.stats.stop_errors += 1;
99
+ }
100
+ throw new Error(`Peer discovery start failed: ${this.errorMessage(error)}`);
101
+ }
102
+ }
103
+ async stop() {
104
+ if (!this.started) {
105
+ return;
106
+ }
107
+ try {
108
+ await this.peerDiscovery.stop();
109
+ }
110
+ catch {
111
+ this.stats.discovery_errors += 1;
112
+ this.stats.stop_errors += 1;
113
+ }
114
+ if (this.offTransportMessage) {
115
+ this.offTransportMessage();
116
+ this.offTransportMessage = null;
117
+ }
118
+ try {
119
+ await this.transport.stop();
120
+ }
121
+ catch {
122
+ this.stats.stop_errors += 1;
123
+ }
124
+ this.started = false;
125
+ }
126
+ async publish(topic, data) {
127
+ if (!this.started) {
128
+ return;
129
+ }
130
+ this.stats.publish_attempted += 1;
131
+ if (!this.isValidTopic(topic)) {
132
+ this.stats.dropped_malformed += 1;
133
+ return;
134
+ }
135
+ const envelope = {
136
+ version: 1,
137
+ message_id: (0, crypto_1.randomUUID)(),
138
+ topic: this.topicKey(topic),
139
+ source_peer_id: this.peerId,
140
+ timestamp: Date.now(),
141
+ payload: this.topicCodec.encode(topic, data),
142
+ };
143
+ const raw = this.envelopeCodec.encode(envelope);
144
+ if (raw.length > this.maxMessageBytes) {
145
+ this.stats.dropped_oversized += 1;
146
+ return;
147
+ }
148
+ try {
149
+ await this.transport.send(raw);
150
+ this.stats.publish_sent += 1;
151
+ }
152
+ catch {
153
+ this.stats.send_errors += 1;
154
+ throw new Error("Transport send failed");
155
+ }
156
+ }
157
+ subscribe(topic, handler) {
158
+ if (!this.isValidTopic(topic)) {
159
+ return;
160
+ }
161
+ const key = this.topicKey(topic);
162
+ if (!this.handlers.has(key)) {
163
+ this.handlers.set(key, new Set());
164
+ }
165
+ this.handlers.get(key)?.add(handler);
166
+ }
167
+ listPeers() {
168
+ return this.peerDiscovery.listPeers();
169
+ }
170
+ getDiagnostics() {
171
+ const peers = this.listPeers();
172
+ const online = peers.filter((peer) => peer.status === "online").length;
173
+ return {
174
+ adapter: "real-preview",
175
+ peer_id: this.peerId,
176
+ namespace: this.namespace,
177
+ components: {
178
+ transport: this.transport.constructor.name,
179
+ discovery: this.peerDiscovery.constructor.name,
180
+ envelope_codec: this.envelopeCodec.constructor.name,
181
+ topic_codec: this.topicCodec.constructor.name,
182
+ },
183
+ limits: {
184
+ max_message_bytes: this.maxMessageBytes,
185
+ dedupe_window_ms: this.dedupeWindowMs,
186
+ dedupe_max_entries: this.dedupeMaxEntries,
187
+ max_future_drift_ms: this.maxFutureDriftMs,
188
+ max_past_drift_ms: this.maxPastDriftMs,
189
+ },
190
+ config: {
191
+ started: this.started,
192
+ topic_handler_count: this.handlers.size,
193
+ transport: this.transport.getConfig?.() ?? null,
194
+ discovery: this.peerDiscovery.getConfig?.() ?? null,
195
+ },
196
+ peers: {
197
+ total: peers.length,
198
+ online,
199
+ stale: Math.max(0, peers.length - online),
200
+ items: peers,
201
+ },
202
+ stats: { ...this.stats },
203
+ transport_stats: this.transport.getStats?.() ?? null,
204
+ discovery_stats: this.peerDiscovery.getStats?.() ?? null,
205
+ };
206
+ }
207
+ onTransportMessage(raw) {
208
+ this.stats.received_total += 1;
209
+ if (raw.length > this.maxMessageBytes) {
210
+ this.stats.dropped_oversized += 1;
211
+ return;
212
+ }
213
+ const decoded = this.envelopeCodec.decode(raw);
214
+ if (!decoded) {
215
+ this.stats.dropped_decode_failed += 1;
216
+ this.stats.dropped_malformed += 1;
217
+ return;
218
+ }
219
+ const validated = (0, messageEnvelope_1.validateNetworkMessageEnvelope)(decoded.envelope, {
220
+ max_future_drift_ms: this.maxFutureDriftMs,
221
+ max_past_drift_ms: this.maxPastDriftMs,
222
+ });
223
+ if (!validated.ok || !validated.envelope) {
224
+ if (validated.reason === "timestamp_future_drift") {
225
+ this.stats.dropped_timestamp_future_drift += 1;
226
+ }
227
+ else if (validated.reason === "timestamp_past_drift") {
228
+ this.stats.dropped_timestamp_past_drift += 1;
229
+ }
230
+ else {
231
+ this.stats.dropped_malformed += 1;
232
+ }
233
+ return;
234
+ }
235
+ this.stats.received_validated += 1;
236
+ const envelope = validated.envelope;
237
+ if (!envelope.topic.startsWith(`${this.namespace}:`)) {
238
+ this.stats.dropped_namespace_mismatch += 1;
239
+ return;
240
+ }
241
+ if (this.isDuplicateMessage(envelope.message_id, envelope.timestamp)) {
242
+ this.stats.dropped_duplicate += 1;
243
+ return;
244
+ }
245
+ try {
246
+ this.peerDiscovery.observeEnvelope(envelope);
247
+ }
248
+ catch {
249
+ this.stats.discovery_errors += 1;
250
+ }
251
+ if (envelope.source_peer_id === this.peerId) {
252
+ this.stats.dropped_self += 1;
253
+ return;
254
+ }
255
+ const topic = this.stripNamespace(envelope.topic);
256
+ if (!topic) {
257
+ this.stats.dropped_namespace_mismatch += 1;
258
+ return;
259
+ }
260
+ const handlers = this.handlers.get(envelope.topic);
261
+ if (!handlers || handlers.size === 0) {
262
+ return;
263
+ }
264
+ try {
265
+ const payload = this.topicCodec.decode(topic, envelope.payload);
266
+ for (const handler of handlers) {
267
+ try {
268
+ handler(payload);
269
+ this.stats.delivered_total += 1;
270
+ }
271
+ catch {
272
+ this.stats.dropped_handler_error += 1;
273
+ }
274
+ }
275
+ }
276
+ catch {
277
+ this.stats.dropped_topic_decode_error += 1;
278
+ }
279
+ }
280
+ topicKey(topic) {
281
+ return `${this.namespace}:${topic}`;
282
+ }
283
+ stripNamespace(topicKey) {
284
+ const prefix = `${this.namespace}:`;
285
+ if (!topicKey.startsWith(prefix)) {
286
+ return null;
287
+ }
288
+ return topicKey.slice(prefix.length);
289
+ }
290
+ isDuplicateMessage(messageId, timestamp) {
291
+ const now = Date.now();
292
+ this.cleanupSeenMessageIds(now);
293
+ const existing = this.seenMessageIds.get(messageId);
294
+ if (existing && now - existing <= this.dedupeWindowMs) {
295
+ return true;
296
+ }
297
+ this.seenMessageIds.set(messageId, Number.isFinite(timestamp) ? timestamp : now);
298
+ if (this.seenMessageIds.size > this.dedupeMaxEntries) {
299
+ const oldestKey = this.seenMessageIds.keys().next().value;
300
+ if (oldestKey) {
301
+ this.seenMessageIds.delete(oldestKey);
302
+ }
303
+ }
304
+ return false;
305
+ }
306
+ cleanupSeenMessageIds(now) {
307
+ for (const [id, ts] of this.seenMessageIds.entries()) {
308
+ if (now - ts > this.dedupeWindowMs) {
309
+ this.seenMessageIds.delete(id);
310
+ }
311
+ }
312
+ }
313
+ isValidTopic(topic) {
314
+ if (typeof topic !== "string") {
315
+ return false;
316
+ }
317
+ const normalized = topic.trim();
318
+ return normalized.length > 0 && !normalized.includes(":");
319
+ }
320
+ normalizeNamespace(namespace) {
321
+ const normalized = namespace.trim();
322
+ return normalized.length > 0 ? normalized : silicaclaw_defaults_json_1.default.network.default_namespace;
323
+ }
324
+ errorMessage(error) {
325
+ if (error instanceof Error) {
326
+ return error.message;
327
+ }
328
+ return String(error);
329
+ }
330
+ }
331
+ exports.RealNetworkAdapterPreview = RealNetworkAdapterPreview;
@@ -0,0 +1,178 @@
1
+ import { NetworkAdapter } from "./types";
2
+ type RelayPreviewOptions = {
3
+ peerId?: string;
4
+ namespace?: string;
5
+ signalingUrl?: string;
6
+ signalingUrls?: string[];
7
+ room?: string;
8
+ seedPeers?: string[];
9
+ bootstrapHints?: string[];
10
+ bootstrapSources?: string[];
11
+ maxMessageBytes?: number;
12
+ pollIntervalMs?: number;
13
+ maxFutureDriftMs?: number;
14
+ maxPastDriftMs?: number;
15
+ requestTimeoutMs?: number;
16
+ peerRefreshIntervalMs?: number;
17
+ };
18
+ type RelayPeer = {
19
+ peer_id: string;
20
+ status: "online";
21
+ first_seen_at: number;
22
+ last_seen_at: number;
23
+ messages_seen: number;
24
+ reconnect_attempts: number;
25
+ meta?: {
26
+ signal_queue_size?: number;
27
+ relay_queue_size?: number;
28
+ };
29
+ };
30
+ type RelayDiagnostics = {
31
+ adapter: "relay-preview";
32
+ peer_id: string;
33
+ namespace: string;
34
+ room: string;
35
+ signaling_url: string;
36
+ signaling_endpoints: string[];
37
+ active_endpoint_index: number;
38
+ bootstrap_sources: string[];
39
+ seed_peers_count: number;
40
+ bootstrap_hints_count: number;
41
+ discovery_events_total: number;
42
+ last_discovery_event_at: number;
43
+ last_join_at: number;
44
+ last_poll_at: number;
45
+ last_publish_at: number;
46
+ last_peer_refresh_at: number;
47
+ last_error_at: number;
48
+ last_error: string | null;
49
+ discovery_events: Array<{
50
+ id: string;
51
+ type: string;
52
+ at: number;
53
+ peer_id?: string;
54
+ endpoint?: string;
55
+ detail?: string;
56
+ }>;
57
+ signaling_messages_sent_total: number;
58
+ signaling_messages_received_total: number;
59
+ reconnect_attempts_total: number;
60
+ active_webrtc_peers: number;
61
+ components: {
62
+ transport: string;
63
+ discovery: string;
64
+ envelope_codec: string;
65
+ topic_codec: string;
66
+ };
67
+ limits: {
68
+ max_message_bytes: number;
69
+ max_future_drift_ms: number;
70
+ max_past_drift_ms: number;
71
+ };
72
+ config: {
73
+ started: boolean;
74
+ topic_handler_count: number;
75
+ poll_interval_ms: number;
76
+ };
77
+ peers: {
78
+ total: number;
79
+ online: number;
80
+ stale: number;
81
+ items: RelayPeer[];
82
+ };
83
+ stats: {
84
+ publish_attempted: number;
85
+ publish_sent: number;
86
+ received_total: number;
87
+ delivered_total: number;
88
+ dropped_malformed: number;
89
+ dropped_oversized: number;
90
+ dropped_namespace_mismatch: number;
91
+ dropped_timestamp_future_drift: number;
92
+ dropped_timestamp_past_drift: number;
93
+ dropped_decode_failed: number;
94
+ dropped_self: number;
95
+ dropped_topic_decode_error: number;
96
+ dropped_handler_error: number;
97
+ signaling_errors: number;
98
+ invalid_signaling_payload_total: number;
99
+ duplicate_sdp_total: number;
100
+ duplicate_ice_total: number;
101
+ start_errors: number;
102
+ stop_errors: number;
103
+ received_validated: number;
104
+ join_attempted: number;
105
+ join_succeeded: number;
106
+ poll_attempted: number;
107
+ poll_succeeded: number;
108
+ peers_refresh_attempted: number;
109
+ peers_refresh_succeeded: number;
110
+ publish_succeeded: number;
111
+ poll_skipped_inflight: number;
112
+ };
113
+ };
114
+ export declare class RelayPreviewAdapter implements NetworkAdapter {
115
+ private readonly peerId;
116
+ private readonly namespace;
117
+ private readonly signalingEndpoints;
118
+ private readonly room;
119
+ private readonly seedPeers;
120
+ private readonly bootstrapHints;
121
+ private readonly bootstrapSources;
122
+ private readonly maxMessageBytes;
123
+ private readonly pollIntervalMs;
124
+ private readonly maxFutureDriftMs;
125
+ private readonly maxPastDriftMs;
126
+ private readonly requestTimeoutMs;
127
+ private readonly peerRefreshIntervalMs;
128
+ private readonly envelopeCodec;
129
+ private readonly topicCodec;
130
+ private started;
131
+ private poller;
132
+ private handlers;
133
+ private directHandlers;
134
+ private peers;
135
+ private seenMessageIds;
136
+ private activeEndpoint;
137
+ private discoveryEvents;
138
+ private discoveryEventsTotal;
139
+ private lastDiscoveryEventAt;
140
+ private signalingMessagesSentTotal;
141
+ private signalingMessagesReceivedTotal;
142
+ private reconnectAttemptsTotal;
143
+ private activeEndpointIndex;
144
+ private lastJoinAt;
145
+ private lastPollAt;
146
+ private lastPublishAt;
147
+ private lastPeerRefreshAt;
148
+ private lastErrorAt;
149
+ private lastError;
150
+ private pollInFlight;
151
+ private currentPollDelayMs;
152
+ private stats;
153
+ constructor(options?: RelayPreviewOptions);
154
+ start(): Promise<void>;
155
+ stop(): Promise<void>;
156
+ publish(topic: string, data: any): Promise<void>;
157
+ subscribe(topic: string, handler: (data: any) => void): void;
158
+ sendDirect(peerId: string, topic: string, data: any): Promise<void>;
159
+ subscribeDirect(topic: string, handler: (data: any, meta?: {
160
+ peerId?: string;
161
+ }) => void): void;
162
+ getDiagnostics(): RelayDiagnostics;
163
+ private pollOnce;
164
+ private refreshPeers;
165
+ private onEnvelope;
166
+ private onDirectEnvelope;
167
+ private dispatchEnvelope;
168
+ private recordDiscovery;
169
+ private joinRoom;
170
+ private maybeRefreshJoin;
171
+ private get;
172
+ private post;
173
+ private requestJson;
174
+ private updatePeersFromList;
175
+ private scheduleNextPoll;
176
+ private ensurePollingAlive;
177
+ }
178
+ export {};