@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,237 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSocialConfigSearchPaths = getSocialConfigSearchPaths;
4
+ exports.findSocialMd = findSocialMd;
5
+ exports.loadSocialConfig = loadSocialConfig;
6
+ exports.findOpenClawIdentity = findOpenClawIdentity;
7
+ exports.findOpenClawProfile = findOpenClawProfile;
8
+ exports.resolveIdentityWithSocial = resolveIdentityWithSocial;
9
+ exports.resolveProfileInputWithSocial = resolveProfileInputWithSocial;
10
+ exports.ensureDefaultSocialMd = ensureDefaultSocialMd;
11
+ const fs_1 = require("fs");
12
+ const os_1 = require("os");
13
+ const path_1 = require("path");
14
+ const crypto_1 = require("./crypto");
15
+ const socialConfig_1 = require("./socialConfig");
16
+ function getSocialConfigSearchPaths(rootDir = process.cwd(), homeDir = (0, os_1.homedir)()) {
17
+ return [
18
+ (0, path_1.resolve)(rootDir, "social.md"),
19
+ (0, path_1.resolve)(rootDir, ".openclaw", "social.md"),
20
+ (0, path_1.resolve)(homeDir, ".openclaw", "social.md"),
21
+ ];
22
+ }
23
+ function findSocialMd(rootDir = process.cwd()) {
24
+ const candidates = getSocialConfigSearchPaths(rootDir);
25
+ for (const path of candidates) {
26
+ if (!(0, fs_1.existsSync)(path))
27
+ continue;
28
+ return {
29
+ found: true,
30
+ source_path: path,
31
+ content: (0, fs_1.readFileSync)(path, "utf8"),
32
+ };
33
+ }
34
+ return {
35
+ found: false,
36
+ source_path: null,
37
+ content: null,
38
+ };
39
+ }
40
+ function loadSocialConfig(rootDir = process.cwd()) {
41
+ const lookup = findSocialMd(rootDir);
42
+ if (!lookup.found || !lookup.content || !lookup.source_path) {
43
+ return {
44
+ config: (0, socialConfig_1.normalizeSocialConfig)({}),
45
+ meta: {
46
+ found: false,
47
+ source_path: null,
48
+ parse_error: null,
49
+ loaded_at: Date.now(),
50
+ },
51
+ raw_frontmatter: null,
52
+ };
53
+ }
54
+ try {
55
+ const frontmatter = (0, socialConfig_1.extractFrontmatter)(lookup.content);
56
+ if (!frontmatter) {
57
+ return {
58
+ config: (0, socialConfig_1.normalizeSocialConfig)({}),
59
+ meta: {
60
+ found: true,
61
+ source_path: lookup.source_path,
62
+ parse_error: "frontmatter_not_found",
63
+ loaded_at: Date.now(),
64
+ },
65
+ raw_frontmatter: null,
66
+ };
67
+ }
68
+ const parsed = (0, socialConfig_1.parseFrontmatterObject)(frontmatter);
69
+ return {
70
+ config: (0, socialConfig_1.normalizeSocialConfig)(parsed),
71
+ meta: {
72
+ found: true,
73
+ source_path: lookup.source_path,
74
+ parse_error: null,
75
+ loaded_at: Date.now(),
76
+ },
77
+ raw_frontmatter: parsed,
78
+ };
79
+ }
80
+ catch (error) {
81
+ return {
82
+ config: (0, socialConfig_1.normalizeSocialConfig)({}),
83
+ meta: {
84
+ found: true,
85
+ source_path: lookup.source_path,
86
+ parse_error: error instanceof Error ? error.message : "social_parse_failed",
87
+ loaded_at: Date.now(),
88
+ },
89
+ raw_frontmatter: null,
90
+ };
91
+ }
92
+ }
93
+ function readJson(path) {
94
+ if (!(0, fs_1.existsSync)(path))
95
+ return null;
96
+ try {
97
+ return JSON.parse((0, fs_1.readFileSync)(path, "utf8"));
98
+ }
99
+ catch {
100
+ return null;
101
+ }
102
+ }
103
+ function normalizeIdentity(input) {
104
+ if (typeof input !== "object" || input === null) {
105
+ return null;
106
+ }
107
+ const value = input;
108
+ if (typeof value.public_key !== "string" || typeof value.private_key !== "string") {
109
+ return null;
110
+ }
111
+ let agentId = typeof value.agent_id === "string" ? value.agent_id : "";
112
+ if (!agentId) {
113
+ try {
114
+ agentId = (0, crypto_1.hashPublicKey)((0, crypto_1.fromBase64)(value.public_key));
115
+ }
116
+ catch {
117
+ return null;
118
+ }
119
+ }
120
+ return {
121
+ agent_id: agentId,
122
+ public_key: value.public_key,
123
+ private_key: value.private_key,
124
+ created_at: Number.isFinite(value.created_at) ? Number(value.created_at) : Date.now(),
125
+ };
126
+ }
127
+ function findOpenClawIdentity(rootDir = process.cwd(), homeDir = (0, os_1.homedir)()) {
128
+ const candidates = [
129
+ (0, path_1.resolve)(rootDir, ".openclaw", "identity.json"),
130
+ (0, path_1.resolve)(rootDir, "identity.json"),
131
+ (0, path_1.resolve)(homeDir, ".openclaw", "identity.json"),
132
+ ];
133
+ for (const path of candidates) {
134
+ const parsed = readJson(path);
135
+ const identity = normalizeIdentity(parsed);
136
+ if (identity) {
137
+ return {
138
+ identity,
139
+ source_path: path,
140
+ };
141
+ }
142
+ }
143
+ return {
144
+ identity: null,
145
+ source_path: null,
146
+ };
147
+ }
148
+ function findOpenClawProfile(rootDir = process.cwd(), homeDir = (0, os_1.homedir)()) {
149
+ const candidates = [
150
+ (0, path_1.resolve)(rootDir, ".openclaw", "profile.json"),
151
+ (0, path_1.resolve)(rootDir, "profile.json"),
152
+ (0, path_1.resolve)(homeDir, ".openclaw", "profile.json"),
153
+ ];
154
+ for (const path of candidates) {
155
+ const parsed = readJson(path);
156
+ if (typeof parsed !== "object" || parsed === null)
157
+ continue;
158
+ const profile = parsed;
159
+ return {
160
+ source_path: path,
161
+ profile: {
162
+ display_name: typeof profile.display_name === "string" ? profile.display_name : "",
163
+ bio: typeof profile.bio === "string" ? profile.bio : "",
164
+ avatar_url: typeof profile.avatar_url === "string" ? profile.avatar_url : "",
165
+ tags: Array.isArray(profile.tags)
166
+ ? profile.tags.map((tag) => String(tag).trim()).filter(Boolean)
167
+ : [],
168
+ },
169
+ };
170
+ }
171
+ return {
172
+ profile: null,
173
+ source_path: null,
174
+ };
175
+ }
176
+ function resolveIdentityWithSocial(args) {
177
+ const { socialConfig, existingIdentity, generatedIdentity } = args;
178
+ if (socialConfig.openclaw.bind_existing_identity) {
179
+ const openclaw = findOpenClawIdentity(args.rootDir ?? process.cwd());
180
+ if (openclaw.identity) {
181
+ return {
182
+ identity: openclaw.identity,
183
+ source: "openclaw-existing",
184
+ openclaw_source_path: openclaw.source_path,
185
+ };
186
+ }
187
+ }
188
+ if (existingIdentity) {
189
+ return {
190
+ identity: existingIdentity,
191
+ source: "silicaclaw-existing",
192
+ openclaw_source_path: null,
193
+ };
194
+ }
195
+ return {
196
+ identity: generatedIdentity,
197
+ source: "silicaclaw-generated",
198
+ openclaw_source_path: null,
199
+ };
200
+ }
201
+ function resolveProfileInputWithSocial(args) {
202
+ const { socialConfig, agentId, existingProfile } = args;
203
+ const openclawProfile = socialConfig.openclaw.use_openclaw_profile_if_available
204
+ ? findOpenClawProfile(args.rootDir ?? process.cwd()).profile
205
+ : null;
206
+ const baseDisplayName = existingProfile?.display_name || "";
207
+ const baseBio = existingProfile?.bio || "";
208
+ const baseAvatarUrl = existingProfile?.avatar_url || "";
209
+ const baseTags = existingProfile?.tags || [];
210
+ // Preserve values saved from local-console first; only fall back to social/openclaw defaults
211
+ // when local profile fields are empty.
212
+ const displayName = baseDisplayName || socialConfig.identity.display_name || openclawProfile?.display_name || "";
213
+ const bio = baseBio || socialConfig.identity.bio || openclawProfile?.bio || "";
214
+ const avatarUrl = baseAvatarUrl || socialConfig.identity.avatar_url || openclawProfile?.avatar_url || "";
215
+ const tags = baseTags.length > 0
216
+ ? baseTags
217
+ : socialConfig.identity.tags.length > 0
218
+ ? socialConfig.identity.tags
219
+ : openclawProfile?.tags || [];
220
+ return {
221
+ agent_id: agentId,
222
+ display_name: displayName,
223
+ bio,
224
+ avatar_url: avatarUrl,
225
+ tags,
226
+ public_enabled: existingProfile?.public_enabled ?? socialConfig.public_enabled,
227
+ };
228
+ }
229
+ function ensureDefaultSocialMd(rootDir = process.cwd(), options = {}) {
230
+ const targetPath = (0, path_1.resolve)(rootDir, "social.md");
231
+ if ((0, fs_1.existsSync)(targetPath)) {
232
+ return { path: targetPath, created: false };
233
+ }
234
+ (0, fs_1.mkdirSync)(rootDir, { recursive: true });
235
+ (0, fs_1.writeFileSync)(targetPath, (0, socialConfig_1.generateDefaultSocialMdTemplate)(options), "utf8");
236
+ return { path: targetPath, created: true };
237
+ }
@@ -0,0 +1,2 @@
1
+ import { SocialRuntimeConfig } from "./socialConfig";
2
+ export declare function generateSocialMdTemplate(runtimeConfig: SocialRuntimeConfig | null | undefined): string;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateSocialMdTemplate = generateSocialMdTemplate;
4
+ function asBool(value, fallback) {
5
+ return typeof value === "boolean" ? value : fallback;
6
+ }
7
+ function asString(value, fallback) {
8
+ return typeof value === "string" ? value : fallback;
9
+ }
10
+ function asStringArray(value, fallback) {
11
+ if (!Array.isArray(value))
12
+ return fallback;
13
+ return value.map((item) => String(item).trim()).filter(Boolean);
14
+ }
15
+ function yamlString(input) {
16
+ return JSON.stringify(input ?? "");
17
+ }
18
+ function yamlStringList(values, indent = " ") {
19
+ if (!values.length) {
20
+ return `${indent}[]`;
21
+ }
22
+ return values.map((value) => `${indent}- ${yamlString(value)}`).join("\n");
23
+ }
24
+ function generateSocialMdTemplate(runtimeConfig) {
25
+ const enabled = asBool(runtimeConfig?.enabled, true);
26
+ const publicEnabled = asBool(runtimeConfig?.public_enabled, false);
27
+ const profile = runtimeConfig?.resolved_profile ?? null;
28
+ const network = runtimeConfig?.resolved_network ?? null;
29
+ const discovery = runtimeConfig?.resolved_discovery ?? null;
30
+ const visibility = runtimeConfig?.visibility ?? null;
31
+ const openclaw = runtimeConfig?.openclaw ?? null;
32
+ const displayName = asString(profile?.display_name, "");
33
+ const bio = asString(profile?.bio, "");
34
+ const tags = asStringArray(profile?.tags, ["openclaw", "local-first"]);
35
+ const mode = network?.mode === "local" || network?.mode === "lan" || network?.mode === "global-preview"
36
+ ? network.mode
37
+ : "global-preview";
38
+ const discoverable = asBool(discovery?.discoverable, true);
39
+ const allowProfileBroadcast = asBool(discovery?.allow_profile_broadcast, true);
40
+ const allowPresenceBroadcast = asBool(discovery?.allow_presence_broadcast, true);
41
+ const allowMessageBroadcast = asBool(discovery?.allow_message_broadcast, true);
42
+ const showDisplayName = asBool(visibility?.show_display_name, true);
43
+ const showBio = asBool(visibility?.show_bio, true);
44
+ const showTags = asBool(visibility?.show_tags, true);
45
+ const showAgentId = asBool(visibility?.show_agent_id, true);
46
+ const showLastSeen = asBool(visibility?.show_last_seen, true);
47
+ const showCapabilitiesSummary = asBool(visibility?.show_capabilities_summary, true);
48
+ const bindExistingIdentity = asBool(openclaw?.bind_existing_identity, true);
49
+ const useOpenClawProfile = asBool(openclaw?.use_openclaw_profile_if_available, true);
50
+ return `---
51
+ enabled: ${enabled}
52
+ public_enabled: ${publicEnabled}
53
+
54
+ identity:
55
+ display_name: ${yamlString(displayName)}
56
+ bio: ${yamlString(bio)}
57
+ tags:
58
+ ${yamlStringList(tags.map((tag) => asString(tag, "")), " ")}
59
+
60
+ network:
61
+ mode: ${yamlString(mode)}
62
+
63
+ discovery:
64
+ discoverable: ${discoverable}
65
+ allow_profile_broadcast: ${allowProfileBroadcast}
66
+ allow_presence_broadcast: ${allowPresenceBroadcast}
67
+ allow_message_broadcast: ${allowMessageBroadcast}
68
+
69
+ visibility:
70
+ show_display_name: ${showDisplayName}
71
+ show_bio: ${showBio}
72
+ show_tags: ${showTags}
73
+ show_agent_id: ${showAgentId}
74
+ show_last_seen: ${showLastSeen}
75
+ show_capabilities_summary: ${showCapabilitiesSummary}
76
+
77
+ openclaw:
78
+ bind_existing_identity: ${bindExistingIdentity}
79
+ use_openclaw_profile_if_available: ${useOpenClawProfile}
80
+ ---
81
+
82
+ # Social
83
+
84
+ Generated from current SilicaClaw runtime state.
85
+
86
+ - Save as \`social.md\` in your OpenClaw workspace.
87
+ - This export does not auto-overwrite any existing file.
88
+ - Advanced network fields are intentionally hidden in template and resolved in runtime.
89
+ `;
90
+ }
@@ -0,0 +1,59 @@
1
+ export type AgentIdentity = {
2
+ agent_id: string;
3
+ public_key: string;
4
+ private_key: string;
5
+ created_at: number;
6
+ };
7
+ export type PublicProfile = {
8
+ agent_id: string;
9
+ display_name: string;
10
+ bio: string;
11
+ tags: string[];
12
+ avatar_url?: string;
13
+ public_enabled: boolean;
14
+ updated_at: number;
15
+ signature: string;
16
+ };
17
+ export type SignedProfileRecord = {
18
+ type: "profile";
19
+ profile: PublicProfile;
20
+ };
21
+ export type PresenceRecord = {
22
+ type: "presence";
23
+ agent_id: string;
24
+ timestamp: number;
25
+ signature: string;
26
+ };
27
+ export type IndexRefRecord = {
28
+ type: "index";
29
+ key: string;
30
+ agent_id: string;
31
+ };
32
+ export type SocialMessageRecord = {
33
+ type: "social.message";
34
+ message_id: string;
35
+ agent_id: string;
36
+ public_key: string;
37
+ display_name: string;
38
+ topic: string;
39
+ body: string;
40
+ created_at: number;
41
+ signature: string;
42
+ };
43
+ export type SocialMessageObservationRecord = {
44
+ type: "social.message.observation";
45
+ observation_id: string;
46
+ message_id: string;
47
+ observed_agent_id: string;
48
+ observer_agent_id: string;
49
+ observer_public_key: string;
50
+ observer_display_name: string;
51
+ observed_at: number;
52
+ signature: string;
53
+ };
54
+ export type DirectoryState = {
55
+ profiles: Record<string, PublicProfile>;
56
+ presence: Record<string, number>;
57
+ index: Record<string, string[]>;
58
+ };
59
+ export type ProfileInput = Omit<PublicProfile, "signature" | "updated_at">;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ {
2
+ "ports": {
3
+ "local_console": 4310,
4
+ "public_explorer": 4311,
5
+ "openclaw_gateway": 18789,
6
+ "network_default": 44123
7
+ },
8
+ "network": {
9
+ "default_mode": "global-preview",
10
+ "default_namespace": "silicaclaw.preview",
11
+ "global_preview": {
12
+ "relay_url": "https://relay.silicaclaw.com",
13
+ "room": "silicaclaw-global-preview"
14
+ }
15
+ },
16
+ "bridge": {
17
+ "api_base": "http://localhost:4310"
18
+ }
19
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./jsonRepo";
2
+ export * from "./repos";
3
+ export * from "./socialRuntimeRepo";
@@ -0,0 +1,19 @@
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("./jsonRepo"), exports);
18
+ __exportStar(require("./repos"), exports);
19
+ __exportStar(require("./socialRuntimeRepo"), exports);
@@ -0,0 +1,7 @@
1
+ export declare class JsonFileRepo<T> {
2
+ private filePath;
3
+ private fallback;
4
+ constructor(filePath: string, fallback: () => T);
5
+ get(): Promise<T>;
6
+ set(value: T): Promise<void>;
7
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonFileRepo = void 0;
4
+ const promises_1 = require("fs/promises");
5
+ const path_1 = require("path");
6
+ class JsonFileRepo {
7
+ filePath;
8
+ fallback;
9
+ constructor(filePath, fallback) {
10
+ this.filePath = filePath;
11
+ this.fallback = fallback;
12
+ }
13
+ async get() {
14
+ try {
15
+ const raw = await (0, promises_1.readFile)(this.filePath, "utf8");
16
+ return JSON.parse(raw);
17
+ }
18
+ catch {
19
+ const seed = this.fallback();
20
+ await this.set(seed);
21
+ return seed;
22
+ }
23
+ }
24
+ async set(value) {
25
+ await (0, promises_1.mkdir)((0, path_1.dirname)(this.filePath), { recursive: true });
26
+ await (0, promises_1.writeFile)(this.filePath, JSON.stringify(value, null, 2), "utf8");
27
+ }
28
+ }
29
+ exports.JsonFileRepo = JsonFileRepo;
@@ -0,0 +1,61 @@
1
+ import { AgentIdentity, DirectoryState, PublicProfile } from "@silicaclaw/core";
2
+ import { JsonFileRepo } from "./jsonRepo";
3
+ export type LogEntry = {
4
+ id: string;
5
+ level: "info" | "warn" | "error";
6
+ message: string;
7
+ timestamp: number;
8
+ };
9
+ export type SocialMessageRecord = {
10
+ type: "social.message";
11
+ message_id: string;
12
+ agent_id: string;
13
+ public_key: string;
14
+ display_name: string;
15
+ topic: string;
16
+ body: string;
17
+ created_at: number;
18
+ signature: string;
19
+ };
20
+ export type SocialMessageObservationRecord = {
21
+ type: "social.message.observation";
22
+ observation_id: string;
23
+ message_id: string;
24
+ observed_agent_id: string;
25
+ observer_agent_id: string;
26
+ observer_public_key: string;
27
+ observer_display_name: string;
28
+ observed_at: number;
29
+ signature: string;
30
+ };
31
+ export type SocialMessageGovernanceConfig = {
32
+ send_limit_max: number;
33
+ send_window_ms: number;
34
+ receive_limit_max: number;
35
+ receive_window_ms: number;
36
+ duplicate_window_ms: number;
37
+ blocked_agent_ids: string[];
38
+ blocked_terms: string[];
39
+ };
40
+ export declare class IdentityRepo extends JsonFileRepo<AgentIdentity | null> {
41
+ constructor(rootDir?: string);
42
+ }
43
+ export declare class ProfileRepo extends JsonFileRepo<PublicProfile | null> {
44
+ constructor(rootDir?: string);
45
+ }
46
+ export declare class CacheRepo extends JsonFileRepo<DirectoryState> {
47
+ constructor(rootDir?: string);
48
+ }
49
+ export declare class LogRepo extends JsonFileRepo<LogEntry[]> {
50
+ constructor(rootDir?: string);
51
+ append(entry: Omit<LogEntry, "id">): Promise<void>;
52
+ }
53
+ export declare class SocialMessageRepo extends JsonFileRepo<SocialMessageRecord[]> {
54
+ constructor(rootDir?: string);
55
+ }
56
+ export declare class SocialMessageObservationRepo extends JsonFileRepo<SocialMessageObservationRecord[]> {
57
+ constructor(rootDir?: string);
58
+ }
59
+ export declare class SocialMessageGovernanceRepo extends JsonFileRepo<SocialMessageGovernanceConfig> {
60
+ constructor(rootDir?: string);
61
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SocialMessageGovernanceRepo = exports.SocialMessageObservationRepo = exports.SocialMessageRepo = exports.LogRepo = exports.CacheRepo = exports.ProfileRepo = exports.IdentityRepo = void 0;
4
+ const path_1 = require("path");
5
+ const core_1 = require("@silicaclaw/core");
6
+ const jsonRepo_1 = require("./jsonRepo");
7
+ class IdentityRepo extends jsonRepo_1.JsonFileRepo {
8
+ constructor(rootDir = process.cwd()) {
9
+ super((0, path_1.resolve)(rootDir, "data", "identity.json"), () => null);
10
+ }
11
+ }
12
+ exports.IdentityRepo = IdentityRepo;
13
+ class ProfileRepo extends jsonRepo_1.JsonFileRepo {
14
+ constructor(rootDir = process.cwd()) {
15
+ super((0, path_1.resolve)(rootDir, "data", "profile.json"), () => null);
16
+ }
17
+ }
18
+ exports.ProfileRepo = ProfileRepo;
19
+ class CacheRepo extends jsonRepo_1.JsonFileRepo {
20
+ constructor(rootDir = process.cwd()) {
21
+ super((0, path_1.resolve)(rootDir, "data", "cache.json"), () => (0, core_1.createEmptyDirectoryState)());
22
+ }
23
+ }
24
+ exports.CacheRepo = CacheRepo;
25
+ class LogRepo extends jsonRepo_1.JsonFileRepo {
26
+ constructor(rootDir = process.cwd()) {
27
+ super((0, path_1.resolve)(rootDir, "data", "logs.json"), () => []);
28
+ }
29
+ async append(entry) {
30
+ const current = await this.get();
31
+ const next = [
32
+ {
33
+ id: `${entry.timestamp}-${Math.random().toString(36).slice(2, 8)}`,
34
+ ...entry,
35
+ },
36
+ ...current,
37
+ ].slice(0, 50);
38
+ await this.set(next);
39
+ }
40
+ }
41
+ exports.LogRepo = LogRepo;
42
+ class SocialMessageRepo extends jsonRepo_1.JsonFileRepo {
43
+ constructor(rootDir = process.cwd()) {
44
+ super((0, path_1.resolve)(rootDir, "data", "social-messages.json"), () => []);
45
+ }
46
+ }
47
+ exports.SocialMessageRepo = SocialMessageRepo;
48
+ class SocialMessageObservationRepo extends jsonRepo_1.JsonFileRepo {
49
+ constructor(rootDir = process.cwd()) {
50
+ super((0, path_1.resolve)(rootDir, "data", "social-message-observations.json"), () => []);
51
+ }
52
+ }
53
+ exports.SocialMessageObservationRepo = SocialMessageObservationRepo;
54
+ class SocialMessageGovernanceRepo extends jsonRepo_1.JsonFileRepo {
55
+ constructor(rootDir = process.cwd()) {
56
+ super((0, path_1.resolve)(rootDir, ".silicaclaw", "social.message-governance.json"), () => ({
57
+ send_limit_max: 5,
58
+ send_window_ms: 60_000,
59
+ receive_limit_max: 8,
60
+ receive_window_ms: 60_000,
61
+ duplicate_window_ms: 180_000,
62
+ blocked_agent_ids: [],
63
+ blocked_terms: [],
64
+ }));
65
+ }
66
+ }
67
+ exports.SocialMessageGovernanceRepo = SocialMessageGovernanceRepo;
@@ -0,0 +1,5 @@
1
+ import { SocialRuntimeConfig } from "@silicaclaw/core";
2
+ import { JsonFileRepo } from "./jsonRepo";
3
+ export declare class SocialRuntimeRepo extends JsonFileRepo<SocialRuntimeConfig> {
4
+ constructor(rootDir?: string);
5
+ }
@@ -0,0 +1,57 @@
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.SocialRuntimeRepo = void 0;
7
+ const path_1 = require("path");
8
+ const jsonRepo_1 = require("./jsonRepo");
9
+ const silicaclaw_defaults_json_1 = __importDefault(require("../config/silicaclaw-defaults.json"));
10
+ function emptyRuntime() {
11
+ return {
12
+ enabled: true,
13
+ public_enabled: false,
14
+ source_path: null,
15
+ last_loaded_at: 0,
16
+ social_found: false,
17
+ parse_error: null,
18
+ resolved_identity: null,
19
+ resolved_profile: null,
20
+ resolved_network: {
21
+ mode: silicaclaw_defaults_json_1.default.network.default_mode,
22
+ adapter: "relay-preview",
23
+ namespace: silicaclaw_defaults_json_1.default.network.default_namespace,
24
+ port: null,
25
+ signaling_url: silicaclaw_defaults_json_1.default.network.global_preview.relay_url,
26
+ signaling_urls: [],
27
+ room: silicaclaw_defaults_json_1.default.network.global_preview.room,
28
+ seed_peers: [],
29
+ bootstrap_hints: [],
30
+ bootstrap_sources: [],
31
+ },
32
+ resolved_discovery: {
33
+ discoverable: true,
34
+ allow_profile_broadcast: true,
35
+ allow_presence_broadcast: true,
36
+ allow_message_broadcast: true,
37
+ },
38
+ visibility: {
39
+ show_display_name: true,
40
+ show_bio: true,
41
+ show_tags: true,
42
+ show_agent_id: true,
43
+ show_last_seen: true,
44
+ show_capabilities_summary: true,
45
+ },
46
+ openclaw: {
47
+ bind_existing_identity: true,
48
+ use_openclaw_profile_if_available: true,
49
+ },
50
+ };
51
+ }
52
+ class SocialRuntimeRepo extends jsonRepo_1.JsonFileRepo {
53
+ constructor(rootDir = process.cwd()) {
54
+ super((0, path_1.resolve)(rootDir, ".silicaclaw", "social.runtime.json"), emptyRuntime);
55
+ }
56
+ }
57
+ exports.SocialRuntimeRepo = SocialRuntimeRepo;