@silicaclaw/cli 2026.3.19-9 → 2026.3.20-2

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 (278) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/DEMO_GUIDE.md +1 -1
  3. package/INSTALL.md +47 -13
  4. package/README.md +54 -19
  5. package/VERSION +1 -1
  6. package/apps/local-console/dist/apps/local-console/src/server.d.ts +51 -12
  7. package/apps/local-console/dist/apps/local-console/src/server.js +619 -183
  8. package/apps/local-console/dist/config/silicaclaw-defaults.json +19 -0
  9. package/apps/local-console/dist/packages/core/src/socialConfig.js +9 -5
  10. package/apps/local-console/dist/packages/network/src/realPreview.js +6 -2
  11. package/apps/local-console/dist/packages/network/src/relayPreview.js +8 -2
  12. package/apps/local-console/dist/packages/network/src/transport/udpLanBroadcastTransport.js +2 -1
  13. package/apps/local-console/dist/packages/network/src/webrtcPreview.js +5 -1
  14. package/apps/local-console/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
  15. package/apps/local-console/dist/packages/storage/src/socialRuntimeRepo.js +8 -4
  16. package/apps/local-console/public/app/app.js +21 -1
  17. package/apps/local-console/public/app/events.js +40 -2
  18. package/apps/local-console/public/app/network.js +32 -3
  19. package/apps/local-console/public/app/overview.js +18 -26
  20. package/apps/local-console/public/app/shell.js +18 -34
  21. package/apps/local-console/public/app/social.js +207 -28
  22. package/apps/local-console/public/app/styles.css +182 -14
  23. package/apps/local-console/public/app/template.js +76 -31
  24. package/apps/local-console/public/app/translations.js +147 -51
  25. package/apps/local-console/src/server.ts +652 -189
  26. package/apps/public-explorer/dist/apps/public-explorer/src/server.d.ts +1 -0
  27. package/apps/public-explorer/dist/apps/public-explorer/src/server.js +41 -0
  28. package/apps/public-explorer/dist/config/silicaclaw-defaults.json +19 -0
  29. package/apps/public-explorer/public/app/app.js +22 -2
  30. package/apps/public-explorer/public/app/template.js +4 -4
  31. package/apps/public-explorer/public/app/translations.js +15 -15
  32. package/apps/public-explorer/src/server.ts +11 -1
  33. package/config/silicaclaw-defaults.json +19 -0
  34. package/dist/apps/local-console/src/server.d.ts +1 -0
  35. package/dist/apps/local-console/src/server.js +555 -0
  36. package/docs/NEW_USER_INSTALL.md +14 -10
  37. package/docs/NEW_USER_OPERATIONS.md +4 -4
  38. package/docs/OPENCLAW_BRIDGE.md +15 -0
  39. package/docs/OPENCLAW_BRIDGE_ZH.md +15 -0
  40. package/docs/RELEASE_CHECKLIST.md +95 -0
  41. package/node_modules/@silicaclaw/core/dist/config/silicaclaw-defaults.json +19 -0
  42. package/node_modules/@silicaclaw/core/dist/packages/core/src/crypto.d.ts +6 -0
  43. package/node_modules/@silicaclaw/core/dist/packages/core/src/crypto.js +50 -0
  44. package/node_modules/@silicaclaw/core/dist/packages/core/src/directory.d.ts +17 -0
  45. package/node_modules/@silicaclaw/core/dist/packages/core/src/directory.js +145 -0
  46. package/node_modules/@silicaclaw/core/dist/packages/core/src/identity.d.ts +2 -0
  47. package/node_modules/@silicaclaw/core/dist/packages/core/src/identity.js +18 -0
  48. package/node_modules/@silicaclaw/core/dist/packages/core/src/index.d.ts +12 -0
  49. package/node_modules/@silicaclaw/core/dist/packages/core/src/index.js +28 -0
  50. package/node_modules/@silicaclaw/core/dist/packages/core/src/indexing.d.ts +6 -0
  51. package/node_modules/@silicaclaw/core/dist/packages/core/src/indexing.js +43 -0
  52. package/node_modules/@silicaclaw/core/dist/packages/core/src/presence.d.ts +4 -0
  53. package/node_modules/@silicaclaw/core/dist/packages/core/src/presence.js +23 -0
  54. package/node_modules/@silicaclaw/core/dist/packages/core/src/profile.d.ts +4 -0
  55. package/node_modules/@silicaclaw/core/dist/packages/core/src/profile.js +39 -0
  56. package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
  57. package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.js +103 -0
  58. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialConfig.d.ts +100 -0
  59. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialConfig.js +300 -0
  60. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialMessage.d.ts +19 -0
  61. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialMessage.js +69 -0
  62. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialResolver.d.ts +46 -0
  63. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialResolver.js +237 -0
  64. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialTemplate.d.ts +2 -0
  65. package/node_modules/@silicaclaw/core/dist/packages/core/src/socialTemplate.js +90 -0
  66. package/node_modules/@silicaclaw/core/dist/packages/core/src/types.d.ts +59 -0
  67. package/node_modules/@silicaclaw/core/dist/packages/core/src/types.js +2 -0
  68. package/node_modules/@silicaclaw/core/src/socialConfig.ts +7 -5
  69. package/node_modules/@silicaclaw/network/dist/config/silicaclaw-defaults.json +19 -0
  70. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/messageEnvelope.d.ts +28 -0
  71. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/messageEnvelope.js +36 -0
  72. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/peerDiscovery.d.ts +43 -0
  73. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/peerDiscovery.js +2 -0
  74. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/topicCodec.d.ts +4 -0
  75. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/topicCodec.js +2 -0
  76. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/transport.d.ts +36 -0
  77. package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/transport.js +2 -0
  78. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.d.ts +5 -0
  79. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.js +24 -0
  80. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonTopicCodec.d.ts +5 -0
  81. package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonTopicCodec.js +12 -0
  82. package/node_modules/@silicaclaw/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.d.ts +28 -0
  83. package/node_modules/@silicaclaw/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.js +144 -0
  84. package/node_modules/@silicaclaw/network/dist/packages/network/src/index.d.ts +14 -0
  85. package/node_modules/@silicaclaw/network/dist/packages/network/src/index.js +30 -0
  86. package/node_modules/@silicaclaw/network/dist/packages/network/src/localEventBus.d.ts +9 -0
  87. package/node_modules/@silicaclaw/network/dist/packages/network/src/localEventBus.js +47 -0
  88. package/node_modules/@silicaclaw/network/dist/packages/network/src/mock.d.ts +8 -0
  89. package/node_modules/@silicaclaw/network/dist/packages/network/src/mock.js +24 -0
  90. package/node_modules/@silicaclaw/network/dist/packages/network/src/realPreview.d.ts +105 -0
  91. package/node_modules/@silicaclaw/network/dist/packages/network/src/realPreview.js +331 -0
  92. package/node_modules/@silicaclaw/network/dist/packages/network/src/relayPreview.d.ts +166 -0
  93. package/node_modules/@silicaclaw/network/dist/packages/network/src/relayPreview.js +448 -0
  94. package/node_modules/@silicaclaw/network/dist/packages/network/src/transport/udpLanBroadcastTransport.d.ts +23 -0
  95. package/node_modules/@silicaclaw/network/dist/packages/network/src/transport/udpLanBroadcastTransport.js +154 -0
  96. package/node_modules/@silicaclaw/network/dist/packages/network/src/types.d.ts +6 -0
  97. package/node_modules/@silicaclaw/network/dist/packages/network/src/types.js +2 -0
  98. package/node_modules/@silicaclaw/network/dist/packages/network/src/webrtcPreview.d.ts +163 -0
  99. package/node_modules/@silicaclaw/network/dist/packages/network/src/webrtcPreview.js +848 -0
  100. package/node_modules/@silicaclaw/network/src/realPreview.ts +3 -2
  101. package/node_modules/@silicaclaw/network/src/relayPreview.ts +5 -2
  102. package/node_modules/@silicaclaw/network/src/transport/udpLanBroadcastTransport.ts +2 -1
  103. package/node_modules/@silicaclaw/network/src/webrtcPreview.ts +2 -1
  104. package/node_modules/@silicaclaw/storage/config/silicaclaw-defaults.json +19 -0
  105. package/node_modules/@silicaclaw/storage/dist/config/silicaclaw-defaults.json +19 -0
  106. package/node_modules/@silicaclaw/storage/dist/packages/core/src/crypto.d.ts +6 -0
  107. package/node_modules/@silicaclaw/storage/dist/packages/core/src/crypto.js +50 -0
  108. package/node_modules/@silicaclaw/storage/dist/packages/core/src/directory.d.ts +17 -0
  109. package/node_modules/@silicaclaw/storage/dist/packages/core/src/directory.js +145 -0
  110. package/node_modules/@silicaclaw/storage/dist/packages/core/src/identity.d.ts +2 -0
  111. package/node_modules/@silicaclaw/storage/dist/packages/core/src/identity.js +18 -0
  112. package/node_modules/@silicaclaw/storage/dist/packages/core/src/index.d.ts +12 -0
  113. package/node_modules/@silicaclaw/storage/dist/packages/core/src/index.js +28 -0
  114. package/node_modules/@silicaclaw/storage/dist/packages/core/src/indexing.d.ts +6 -0
  115. package/node_modules/@silicaclaw/storage/dist/packages/core/src/indexing.js +43 -0
  116. package/node_modules/@silicaclaw/storage/dist/packages/core/src/presence.d.ts +4 -0
  117. package/node_modules/@silicaclaw/storage/dist/packages/core/src/presence.js +23 -0
  118. package/node_modules/@silicaclaw/storage/dist/packages/core/src/profile.d.ts +4 -0
  119. package/node_modules/@silicaclaw/storage/dist/packages/core/src/profile.js +39 -0
  120. package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
  121. package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.js +103 -0
  122. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialConfig.d.ts +100 -0
  123. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialConfig.js +300 -0
  124. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialMessage.d.ts +19 -0
  125. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialMessage.js +69 -0
  126. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialResolver.d.ts +46 -0
  127. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialResolver.js +237 -0
  128. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialTemplate.d.ts +2 -0
  129. package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialTemplate.js +90 -0
  130. package/node_modules/@silicaclaw/storage/dist/packages/core/src/types.d.ts +59 -0
  131. package/node_modules/@silicaclaw/storage/dist/packages/core/src/types.js +2 -0
  132. package/node_modules/@silicaclaw/storage/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
  133. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/index.d.ts +3 -0
  134. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/index.js +19 -0
  135. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/jsonRepo.d.ts +7 -0
  136. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/jsonRepo.js +29 -0
  137. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/repos.d.ts +61 -0
  138. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/repos.js +67 -0
  139. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/socialRuntimeRepo.d.ts +5 -0
  140. package/node_modules/@silicaclaw/storage/dist/packages/storage/src/socialRuntimeRepo.js +57 -0
  141. package/node_modules/@silicaclaw/storage/dist/socialRuntimeRepo.js +8 -4
  142. package/node_modules/@silicaclaw/storage/src/socialRuntimeRepo.ts +5 -4
  143. package/node_modules/@silicaclaw/storage/tsconfig.json +1 -6
  144. package/openclaw-skills/silicaclaw-bridge-setup/SKILL.md +147 -0
  145. package/openclaw-skills/silicaclaw-bridge-setup/VERSION +1 -0
  146. package/openclaw-skills/silicaclaw-bridge-setup/agents/openai.yaml +6 -0
  147. package/openclaw-skills/silicaclaw-bridge-setup/manifest.json +27 -0
  148. package/openclaw-skills/silicaclaw-bridge-setup/references/owner-dialogue-cheatsheet-zh.md +58 -0
  149. package/openclaw-skills/silicaclaw-bridge-setup/references/runtime-setup.md +43 -0
  150. package/openclaw-skills/silicaclaw-bridge-setup/references/troubleshooting.md +24 -0
  151. package/openclaw-skills/silicaclaw-broadcast/SKILL.md +132 -0
  152. package/openclaw-skills/silicaclaw-broadcast/VERSION +1 -1
  153. package/openclaw-skills/silicaclaw-broadcast/agents/openai.yaml +2 -2
  154. package/openclaw-skills/silicaclaw-broadcast/manifest.json +3 -2
  155. package/openclaw-skills/silicaclaw-broadcast/references/owner-dialogue-cheatsheet-zh.md +81 -0
  156. package/openclaw-skills/silicaclaw-owner-push/SKILL.md +217 -0
  157. package/openclaw-skills/silicaclaw-owner-push/VERSION +1 -0
  158. package/openclaw-skills/silicaclaw-owner-push/agents/openai.yaml +6 -0
  159. package/openclaw-skills/silicaclaw-owner-push/manifest.json +30 -0
  160. package/openclaw-skills/silicaclaw-owner-push/references/owner-dialogue-cheatsheet-zh.md +87 -0
  161. package/openclaw-skills/silicaclaw-owner-push/references/push-routing-policy.md +43 -0
  162. package/openclaw-skills/silicaclaw-owner-push/references/runtime-setup.md +41 -0
  163. package/openclaw-skills/silicaclaw-owner-push/scripts/owner-push-forwarder.mjs +214 -0
  164. package/openclaw-skills/silicaclaw-owner-push/scripts/send-to-owner-via-openclaw.mjs +69 -0
  165. package/package.json +5 -1
  166. package/packages/core/dist/config/silicaclaw-defaults.json +19 -0
  167. package/packages/core/dist/packages/core/src/crypto.d.ts +6 -0
  168. package/packages/core/dist/packages/core/src/crypto.js +50 -0
  169. package/packages/core/dist/packages/core/src/directory.d.ts +17 -0
  170. package/packages/core/dist/packages/core/src/directory.js +145 -0
  171. package/packages/core/dist/packages/core/src/identity.d.ts +2 -0
  172. package/packages/core/dist/packages/core/src/identity.js +18 -0
  173. package/packages/core/dist/packages/core/src/index.d.ts +12 -0
  174. package/packages/core/dist/packages/core/src/index.js +28 -0
  175. package/packages/core/dist/packages/core/src/indexing.d.ts +6 -0
  176. package/packages/core/dist/packages/core/src/indexing.js +43 -0
  177. package/packages/core/dist/packages/core/src/presence.d.ts +4 -0
  178. package/packages/core/dist/packages/core/src/presence.js +23 -0
  179. package/packages/core/dist/packages/core/src/profile.d.ts +4 -0
  180. package/packages/core/dist/packages/core/src/profile.js +39 -0
  181. package/packages/core/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
  182. package/packages/core/dist/packages/core/src/publicProfileSummary.js +103 -0
  183. package/packages/core/dist/packages/core/src/socialConfig.d.ts +100 -0
  184. package/packages/core/dist/packages/core/src/socialConfig.js +300 -0
  185. package/packages/core/dist/packages/core/src/socialMessage.d.ts +19 -0
  186. package/packages/core/dist/packages/core/src/socialMessage.js +69 -0
  187. package/packages/core/dist/packages/core/src/socialResolver.d.ts +46 -0
  188. package/packages/core/dist/packages/core/src/socialResolver.js +237 -0
  189. package/packages/core/dist/packages/core/src/socialTemplate.d.ts +2 -0
  190. package/packages/core/dist/packages/core/src/socialTemplate.js +90 -0
  191. package/packages/core/dist/packages/core/src/types.d.ts +59 -0
  192. package/packages/core/dist/packages/core/src/types.js +2 -0
  193. package/packages/core/src/socialConfig.ts +7 -5
  194. package/packages/network/dist/config/silicaclaw-defaults.json +19 -0
  195. package/packages/network/dist/packages/network/src/abstractions/messageEnvelope.d.ts +28 -0
  196. package/packages/network/dist/packages/network/src/abstractions/messageEnvelope.js +36 -0
  197. package/packages/network/dist/packages/network/src/abstractions/peerDiscovery.d.ts +43 -0
  198. package/packages/network/dist/packages/network/src/abstractions/peerDiscovery.js +2 -0
  199. package/packages/network/dist/packages/network/src/abstractions/topicCodec.d.ts +4 -0
  200. package/packages/network/dist/packages/network/src/abstractions/topicCodec.js +2 -0
  201. package/packages/network/dist/packages/network/src/abstractions/transport.d.ts +36 -0
  202. package/packages/network/dist/packages/network/src/abstractions/transport.js +2 -0
  203. package/packages/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.d.ts +5 -0
  204. package/packages/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.js +24 -0
  205. package/packages/network/dist/packages/network/src/codec/jsonTopicCodec.d.ts +5 -0
  206. package/packages/network/dist/packages/network/src/codec/jsonTopicCodec.js +12 -0
  207. package/packages/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.d.ts +28 -0
  208. package/packages/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.js +144 -0
  209. package/packages/network/dist/packages/network/src/index.d.ts +14 -0
  210. package/packages/network/dist/packages/network/src/index.js +30 -0
  211. package/packages/network/dist/packages/network/src/localEventBus.d.ts +9 -0
  212. package/packages/network/dist/packages/network/src/localEventBus.js +47 -0
  213. package/packages/network/dist/packages/network/src/mock.d.ts +8 -0
  214. package/packages/network/dist/packages/network/src/mock.js +24 -0
  215. package/packages/network/dist/packages/network/src/realPreview.d.ts +105 -0
  216. package/packages/network/dist/packages/network/src/realPreview.js +331 -0
  217. package/packages/network/dist/packages/network/src/relayPreview.d.ts +166 -0
  218. package/packages/network/dist/packages/network/src/relayPreview.js +448 -0
  219. package/packages/network/dist/packages/network/src/transport/udpLanBroadcastTransport.d.ts +23 -0
  220. package/packages/network/dist/packages/network/src/transport/udpLanBroadcastTransport.js +154 -0
  221. package/packages/network/dist/packages/network/src/types.d.ts +6 -0
  222. package/packages/network/dist/packages/network/src/types.js +2 -0
  223. package/packages/network/dist/packages/network/src/webrtcPreview.d.ts +163 -0
  224. package/packages/network/dist/packages/network/src/webrtcPreview.js +848 -0
  225. package/packages/network/src/realPreview.ts +3 -2
  226. package/packages/network/src/relayPreview.ts +5 -2
  227. package/packages/network/src/transport/udpLanBroadcastTransport.ts +2 -1
  228. package/packages/network/src/webrtcPreview.ts +2 -1
  229. package/packages/storage/config/silicaclaw-defaults.json +19 -0
  230. package/packages/storage/dist/config/silicaclaw-defaults.json +19 -0
  231. package/packages/storage/dist/packages/core/src/crypto.d.ts +6 -0
  232. package/packages/storage/dist/packages/core/src/crypto.js +50 -0
  233. package/packages/storage/dist/packages/core/src/directory.d.ts +17 -0
  234. package/packages/storage/dist/packages/core/src/directory.js +145 -0
  235. package/packages/storage/dist/packages/core/src/identity.d.ts +2 -0
  236. package/packages/storage/dist/packages/core/src/identity.js +18 -0
  237. package/packages/storage/dist/packages/core/src/index.d.ts +12 -0
  238. package/packages/storage/dist/packages/core/src/index.js +28 -0
  239. package/packages/storage/dist/packages/core/src/indexing.d.ts +6 -0
  240. package/packages/storage/dist/packages/core/src/indexing.js +43 -0
  241. package/packages/storage/dist/packages/core/src/presence.d.ts +4 -0
  242. package/packages/storage/dist/packages/core/src/presence.js +23 -0
  243. package/packages/storage/dist/packages/core/src/profile.d.ts +4 -0
  244. package/packages/storage/dist/packages/core/src/profile.js +39 -0
  245. package/packages/storage/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
  246. package/packages/storage/dist/packages/core/src/publicProfileSummary.js +103 -0
  247. package/packages/storage/dist/packages/core/src/socialConfig.d.ts +100 -0
  248. package/packages/storage/dist/packages/core/src/socialConfig.js +300 -0
  249. package/packages/storage/dist/packages/core/src/socialMessage.d.ts +19 -0
  250. package/packages/storage/dist/packages/core/src/socialMessage.js +69 -0
  251. package/packages/storage/dist/packages/core/src/socialResolver.d.ts +46 -0
  252. package/packages/storage/dist/packages/core/src/socialResolver.js +237 -0
  253. package/packages/storage/dist/packages/core/src/socialTemplate.d.ts +2 -0
  254. package/packages/storage/dist/packages/core/src/socialTemplate.js +90 -0
  255. package/packages/storage/dist/packages/core/src/types.d.ts +59 -0
  256. package/packages/storage/dist/packages/core/src/types.js +2 -0
  257. package/packages/storage/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
  258. package/packages/storage/dist/packages/storage/src/index.d.ts +3 -0
  259. package/packages/storage/dist/packages/storage/src/index.js +19 -0
  260. package/packages/storage/dist/packages/storage/src/jsonRepo.d.ts +7 -0
  261. package/packages/storage/dist/packages/storage/src/jsonRepo.js +29 -0
  262. package/packages/storage/dist/packages/storage/src/repos.d.ts +61 -0
  263. package/packages/storage/dist/packages/storage/src/repos.js +67 -0
  264. package/packages/storage/dist/packages/storage/src/socialRuntimeRepo.d.ts +5 -0
  265. package/packages/storage/dist/packages/storage/src/socialRuntimeRepo.js +57 -0
  266. package/packages/storage/dist/socialRuntimeRepo.js +8 -4
  267. package/packages/storage/src/socialRuntimeRepo.ts +5 -4
  268. package/packages/storage/tsconfig.json +1 -6
  269. package/scripts/functional-check.mjs +35 -6
  270. package/scripts/install-openclaw-skill.mjs +9 -2
  271. package/scripts/openclaw-bridge-adapter.mjs +3 -1
  272. package/scripts/openclaw-bridge-client.mjs +3 -1
  273. package/scripts/openclaw-runtime-demo.mjs +3 -1
  274. package/scripts/quickstart.sh +14 -10
  275. package/scripts/release-pack.mjs +59 -1
  276. package/scripts/silicaclaw-cli.mjs +162 -50
  277. package/scripts/silicaclaw-gateway.mjs +302 -84
  278. package/scripts/validate-openclaw-skill.mjs +79 -21
@@ -0,0 +1,28 @@
1
+ import { PeerDiscovery, PeerDiscoveryConfigSnapshot, PeerDiscoveryContext, PeerDiscoveryStats, PeerSnapshot } from "../abstractions/peerDiscovery";
2
+ import { NetworkMessageEnvelope } from "../abstractions/messageEnvelope";
3
+ type HeartbeatPeerDiscoveryOptions = {
4
+ heartbeatIntervalMs?: number;
5
+ staleAfterMs?: number;
6
+ removeAfterMs?: number;
7
+ topic?: string;
8
+ };
9
+ export declare class HeartbeatPeerDiscovery implements PeerDiscovery {
10
+ private peers;
11
+ private timer;
12
+ private context;
13
+ private heartbeatIntervalMs;
14
+ private staleAfterMs;
15
+ private removeAfterMs;
16
+ private topic;
17
+ private stats;
18
+ constructor(options?: HeartbeatPeerDiscoveryOptions);
19
+ start(context: PeerDiscoveryContext): Promise<void>;
20
+ stop(): Promise<void>;
21
+ observeEnvelope(envelope: NetworkMessageEnvelope): void;
22
+ listPeers(): PeerSnapshot[];
23
+ getStats(): PeerDiscoveryStats;
24
+ getConfig(): PeerDiscoveryConfigSnapshot;
25
+ private sendHeartbeat;
26
+ private reconcilePeerHealth;
27
+ }
28
+ export {};
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeartbeatPeerDiscovery = void 0;
4
+ class HeartbeatPeerDiscovery {
5
+ peers = new Map();
6
+ timer = null;
7
+ context = null;
8
+ heartbeatIntervalMs;
9
+ staleAfterMs;
10
+ removeAfterMs;
11
+ topic;
12
+ stats = {
13
+ observe_calls: 0,
14
+ peers_added: 0,
15
+ peers_removed: 0,
16
+ peers_marked_stale: 0,
17
+ heartbeat_sent: 0,
18
+ heartbeat_send_errors: 0,
19
+ reconcile_runs: 0,
20
+ last_observed_at: 0,
21
+ last_heartbeat_at: 0,
22
+ last_reconcile_at: 0,
23
+ last_error_at: 0,
24
+ };
25
+ constructor(options = {}) {
26
+ this.heartbeatIntervalMs = options.heartbeatIntervalMs ?? 12_000;
27
+ this.staleAfterMs = options.staleAfterMs ?? 45_000;
28
+ this.removeAfterMs = options.removeAfterMs ?? 180_000;
29
+ this.topic = options.topic ?? "__discovery/heartbeat";
30
+ }
31
+ async start(context) {
32
+ this.context = context;
33
+ this.reconcilePeerHealth();
34
+ await this.sendHeartbeat();
35
+ this.timer = setInterval(async () => {
36
+ await this.sendHeartbeat();
37
+ this.reconcilePeerHealth();
38
+ }, this.heartbeatIntervalMs);
39
+ }
40
+ async stop() {
41
+ if (this.timer) {
42
+ clearInterval(this.timer);
43
+ this.timer = null;
44
+ }
45
+ }
46
+ observeEnvelope(envelope) {
47
+ this.stats.observe_calls += 1;
48
+ this.stats.last_observed_at = Date.now();
49
+ if (!this.context) {
50
+ return;
51
+ }
52
+ if (envelope.source_peer_id === this.context.self_peer_id) {
53
+ return;
54
+ }
55
+ const now = Date.now();
56
+ const existing = this.peers.get(envelope.source_peer_id);
57
+ if (!existing) {
58
+ this.stats.peers_added += 1;
59
+ }
60
+ this.peers.set(envelope.source_peer_id, {
61
+ peer_id: envelope.source_peer_id,
62
+ first_seen_at: existing?.first_seen_at ?? now,
63
+ last_seen_at: now,
64
+ status: "online",
65
+ stale_since_at: undefined,
66
+ messages_seen: (existing?.messages_seen ?? 0) + 1,
67
+ meta: envelope.topic === this.topic && typeof envelope.payload === "object" && envelope.payload !== null
68
+ ? envelope.payload
69
+ : existing?.meta,
70
+ });
71
+ }
72
+ listPeers() {
73
+ this.reconcilePeerHealth();
74
+ return Array.from(this.peers.values()).sort((a, b) => {
75
+ const score = (p) => (p.status === "online" ? 1 : 0);
76
+ const byStatus = score(b) - score(a);
77
+ if (byStatus !== 0) {
78
+ return byStatus;
79
+ }
80
+ return b.last_seen_at - a.last_seen_at;
81
+ });
82
+ }
83
+ getStats() {
84
+ return { ...this.stats };
85
+ }
86
+ getConfig() {
87
+ return {
88
+ discovery: "heartbeat-peer-discovery",
89
+ heartbeat_topic: this.topic,
90
+ heartbeat_interval_ms: this.heartbeatIntervalMs,
91
+ stale_after_ms: this.staleAfterMs,
92
+ remove_after_ms: this.removeAfterMs,
93
+ };
94
+ }
95
+ async sendHeartbeat() {
96
+ if (!this.context) {
97
+ return;
98
+ }
99
+ try {
100
+ await this.context.publishControl(this.topic, {
101
+ kind: "heartbeat",
102
+ at: Date.now(),
103
+ });
104
+ this.stats.heartbeat_sent += 1;
105
+ this.stats.last_heartbeat_at = Date.now();
106
+ }
107
+ catch {
108
+ this.stats.heartbeat_send_errors += 1;
109
+ this.stats.last_error_at = Date.now();
110
+ }
111
+ }
112
+ reconcilePeerHealth() {
113
+ const now = Date.now();
114
+ this.stats.reconcile_runs += 1;
115
+ this.stats.last_reconcile_at = now;
116
+ for (const [peerId, peer] of this.peers.entries()) {
117
+ const age = now - peer.last_seen_at;
118
+ if (age > this.removeAfterMs) {
119
+ this.peers.delete(peerId);
120
+ this.stats.peers_removed += 1;
121
+ continue;
122
+ }
123
+ if (age > this.staleAfterMs) {
124
+ if (peer.status !== "stale") {
125
+ this.stats.peers_marked_stale += 1;
126
+ }
127
+ this.peers.set(peerId, {
128
+ ...peer,
129
+ status: "stale",
130
+ stale_since_at: peer.stale_since_at ?? now,
131
+ });
132
+ continue;
133
+ }
134
+ if (peer.status !== "online") {
135
+ this.peers.set(peerId, {
136
+ ...peer,
137
+ status: "online",
138
+ stale_since_at: undefined,
139
+ });
140
+ }
141
+ }
142
+ }
143
+ }
144
+ exports.HeartbeatPeerDiscovery = HeartbeatPeerDiscovery;
@@ -0,0 +1,14 @@
1
+ export * from "./types";
2
+ export * from "./mock";
3
+ export * from "./localEventBus";
4
+ export * from "./realPreview";
5
+ export * from "./webrtcPreview";
6
+ export * from "./relayPreview";
7
+ export * from "./abstractions/messageEnvelope";
8
+ export * from "./abstractions/topicCodec";
9
+ export * from "./abstractions/transport";
10
+ export * from "./abstractions/peerDiscovery";
11
+ export * from "./codec/jsonMessageEnvelopeCodec";
12
+ export * from "./codec/jsonTopicCodec";
13
+ export * from "./discovery/heartbeatPeerDiscovery";
14
+ export * from "./transport/udpLanBroadcastTransport";
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./mock"), exports);
19
+ __exportStar(require("./localEventBus"), exports);
20
+ __exportStar(require("./realPreview"), exports);
21
+ __exportStar(require("./webrtcPreview"), exports);
22
+ __exportStar(require("./relayPreview"), exports);
23
+ __exportStar(require("./abstractions/messageEnvelope"), exports);
24
+ __exportStar(require("./abstractions/topicCodec"), exports);
25
+ __exportStar(require("./abstractions/transport"), exports);
26
+ __exportStar(require("./abstractions/peerDiscovery"), exports);
27
+ __exportStar(require("./codec/jsonMessageEnvelopeCodec"), exports);
28
+ __exportStar(require("./codec/jsonTopicCodec"), exports);
29
+ __exportStar(require("./discovery/heartbeatPeerDiscovery"), exports);
30
+ __exportStar(require("./transport/udpLanBroadcastTransport"), exports);
@@ -0,0 +1,9 @@
1
+ import { NetworkAdapter } from "./types";
2
+ export declare class LocalEventBusAdapter implements NetworkAdapter {
3
+ private started;
4
+ private emitter;
5
+ start(): Promise<void>;
6
+ stop(): Promise<void>;
7
+ publish(topic: string, data: any): Promise<void>;
8
+ subscribe(topic: string, handler: (data: any) => void): void;
9
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocalEventBusAdapter = void 0;
4
+ const events_1 = require("events");
5
+ const CHANNEL_NAME = "silicaclaw-local-event-bus";
6
+ function getNodeBus() {
7
+ const g = globalThis;
8
+ if (!g.__silicaclaw_bus) {
9
+ g.__silicaclaw_bus = new events_1.EventEmitter();
10
+ }
11
+ return g.__silicaclaw_bus;
12
+ }
13
+ class LocalEventBusAdapter {
14
+ started = false;
15
+ emitter = getNodeBus();
16
+ async start() {
17
+ this.started = true;
18
+ }
19
+ async stop() {
20
+ this.started = false;
21
+ }
22
+ async publish(topic, data) {
23
+ if (!this.started) {
24
+ return;
25
+ }
26
+ if (typeof BroadcastChannel !== "undefined") {
27
+ const channel = new BroadcastChannel(CHANNEL_NAME);
28
+ channel.postMessage({ topic, data });
29
+ channel.close();
30
+ return;
31
+ }
32
+ setImmediate(() => this.emitter.emit(topic, data));
33
+ }
34
+ subscribe(topic, handler) {
35
+ if (typeof BroadcastChannel !== "undefined") {
36
+ const channel = new BroadcastChannel(CHANNEL_NAME);
37
+ channel.onmessage = (event) => {
38
+ if (event.data?.topic === topic) {
39
+ handler(event.data.data);
40
+ }
41
+ };
42
+ return;
43
+ }
44
+ this.emitter.on(topic, handler);
45
+ }
46
+ }
47
+ exports.LocalEventBusAdapter = LocalEventBusAdapter;
@@ -0,0 +1,8 @@
1
+ import { NetworkAdapter } from "./types";
2
+ export declare class MockNetworkAdapter implements NetworkAdapter {
3
+ private started;
4
+ start(): Promise<void>;
5
+ stop(): Promise<void>;
6
+ publish(topic: string, data: any): Promise<void>;
7
+ subscribe(topic: string, handler: (data: any) => void): void;
8
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MockNetworkAdapter = void 0;
4
+ const events_1 = require("events");
5
+ const bus = new events_1.EventEmitter();
6
+ class MockNetworkAdapter {
7
+ started = false;
8
+ async start() {
9
+ this.started = true;
10
+ }
11
+ async stop() {
12
+ this.started = false;
13
+ }
14
+ async publish(topic, data) {
15
+ if (!this.started) {
16
+ return;
17
+ }
18
+ setImmediate(() => bus.emit(topic, data));
19
+ }
20
+ subscribe(topic, handler) {
21
+ bus.on(topic, handler);
22
+ }
23
+ }
24
+ exports.MockNetworkAdapter = MockNetworkAdapter;
@@ -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 {};