@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.
- package/CHANGELOG.md +182 -0
- package/DEMO_GUIDE.md +1 -1
- package/INSTALL.md +53 -13
- package/README.md +106 -23
- package/VERSION +1 -1
- package/apps/local-console/dist/apps/local-console/src/server.d.ts +180 -14
- package/apps/local-console/dist/apps/local-console/src/server.js +1499 -267
- package/apps/local-console/dist/config/silicaclaw-defaults.json +19 -0
- package/apps/local-console/dist/packages/core/src/index.d.ts +2 -0
- package/apps/local-console/dist/packages/core/src/index.js +2 -0
- package/apps/local-console/dist/packages/core/src/privateCrypto.d.ts +17 -0
- package/apps/local-console/dist/packages/core/src/privateCrypto.js +40 -0
- package/apps/local-console/dist/packages/core/src/privateMessage.d.ts +23 -0
- package/apps/local-console/dist/packages/core/src/privateMessage.js +74 -0
- package/apps/local-console/dist/packages/core/src/profile.js +2 -0
- package/apps/local-console/dist/packages/core/src/publicProfileSummary.d.ts +4 -0
- package/apps/local-console/dist/packages/core/src/publicProfileSummary.js +3 -0
- package/apps/local-console/dist/packages/core/src/socialConfig.js +9 -5
- package/apps/local-console/dist/packages/core/src/types.d.ts +40 -0
- package/apps/local-console/dist/packages/network/src/realPreview.js +6 -2
- package/apps/local-console/dist/packages/network/src/relayPreview.d.ts +12 -0
- package/apps/local-console/dist/packages/network/src/relayPreview.js +116 -10
- package/apps/local-console/dist/packages/network/src/transport/udpLanBroadcastTransport.js +2 -1
- package/apps/local-console/dist/packages/network/src/types.d.ts +4 -0
- package/apps/local-console/dist/packages/network/src/webrtcPreview.js +5 -1
- package/apps/local-console/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
- package/apps/local-console/dist/packages/storage/src/repos.d.ts +13 -1
- package/apps/local-console/dist/packages/storage/src/repos.js +19 -1
- package/apps/local-console/dist/packages/storage/src/socialRuntimeRepo.js +8 -4
- package/apps/local-console/public/app/app.js +486 -12
- package/apps/local-console/public/app/events.js +61 -2
- package/apps/local-console/public/app/network.js +176 -35
- package/apps/local-console/public/app/overview.js +75 -53
- package/apps/local-console/public/app/shell.js +18 -34
- package/apps/local-console/public/app/social.js +495 -93
- package/apps/local-console/public/app/styles.css +309 -15
- package/apps/local-console/public/app/template.js +182 -51
- package/apps/local-console/public/app/translations.js +476 -266
- package/apps/local-console/src/server.ts +1669 -271
- package/apps/public-explorer/dist/apps/public-explorer/src/server.d.ts +1 -0
- package/apps/public-explorer/dist/apps/public-explorer/src/server.js +41 -0
- package/apps/public-explorer/dist/config/silicaclaw-defaults.json +19 -0
- package/apps/public-explorer/public/app/app.js +22 -2
- package/apps/public-explorer/public/app/template.js +4 -4
- package/apps/public-explorer/public/app/translations.js +29 -29
- package/apps/public-explorer/src/server.ts +11 -1
- package/config/silicaclaw-defaults.json +19 -0
- package/dist/apps/local-console/src/server.d.ts +1 -0
- package/dist/apps/local-console/src/server.js +555 -0
- package/docs/NEW_USER_INSTALL.md +14 -10
- package/docs/NEW_USER_OPERATIONS.md +9 -9
- package/docs/OPENCLAW_BRIDGE.md +22 -7
- package/docs/OPENCLAW_BRIDGE_ZH.md +21 -6
- package/docs/RELEASE_CHECKLIST.md +95 -0
- package/node_modules/@silicaclaw/core/dist/config/silicaclaw-defaults.json +19 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/crypto.d.ts +6 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/crypto.js +50 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/directory.d.ts +17 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/directory.js +145 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/identity.d.ts +2 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/identity.js +18 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/index.d.ts +14 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/index.js +30 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/indexing.d.ts +6 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/indexing.js +43 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/presence.d.ts +4 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/presence.js +23 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/privateCrypto.d.ts +17 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/privateCrypto.js +40 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/privateMessage.d.ts +23 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/privateMessage.js +74 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/profile.d.ts +4 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/profile.js +41 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.js +106 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialConfig.d.ts +100 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialConfig.js +300 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialMessage.d.ts +19 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialMessage.js +69 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialResolver.d.ts +46 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialResolver.js +237 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialTemplate.d.ts +2 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/socialTemplate.js +90 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/types.d.ts +99 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/types.js +2 -0
- package/node_modules/@silicaclaw/core/src/index.ts +2 -0
- package/node_modules/@silicaclaw/core/src/privateCrypto.ts +57 -0
- package/node_modules/@silicaclaw/core/src/privateMessage.ts +101 -0
- package/node_modules/@silicaclaw/core/src/profile.ts +2 -0
- package/node_modules/@silicaclaw/core/src/publicProfileSummary.ts +7 -0
- package/node_modules/@silicaclaw/core/src/socialConfig.ts +7 -5
- package/node_modules/@silicaclaw/core/src/types.ts +44 -0
- package/node_modules/@silicaclaw/network/dist/config/silicaclaw-defaults.json +19 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/messageEnvelope.d.ts +28 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/messageEnvelope.js +36 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/peerDiscovery.d.ts +43 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/peerDiscovery.js +2 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/topicCodec.d.ts +4 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/topicCodec.js +2 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/transport.d.ts +36 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/abstractions/transport.js +2 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.d.ts +5 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.js +24 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonTopicCodec.d.ts +5 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/codec/jsonTopicCodec.js +12 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.d.ts +28 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.js +144 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/index.d.ts +14 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/index.js +30 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/localEventBus.d.ts +9 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/localEventBus.js +47 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/mock.d.ts +8 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/mock.js +24 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/realPreview.d.ts +105 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/realPreview.js +331 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/relayPreview.d.ts +178 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/relayPreview.js +548 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/transport/udpLanBroadcastTransport.d.ts +23 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/transport/udpLanBroadcastTransport.js +154 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/types.d.ts +10 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/types.js +2 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/webrtcPreview.d.ts +163 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/webrtcPreview.js +848 -0
- package/node_modules/@silicaclaw/network/src/realPreview.ts +3 -2
- package/node_modules/@silicaclaw/network/src/relayPreview.ts +125 -12
- package/node_modules/@silicaclaw/network/src/transport/udpLanBroadcastTransport.ts +2 -1
- package/node_modules/@silicaclaw/network/src/types.ts +2 -0
- package/node_modules/@silicaclaw/network/src/webrtcPreview.ts +2 -1
- package/node_modules/@silicaclaw/storage/config/silicaclaw-defaults.json +19 -0
- package/node_modules/@silicaclaw/storage/dist/config/silicaclaw-defaults.json +19 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/crypto.d.ts +6 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/crypto.js +50 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/directory.d.ts +17 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/directory.js +145 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/identity.d.ts +2 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/identity.js +18 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/index.d.ts +14 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/index.js +30 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/indexing.d.ts +6 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/indexing.js +43 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/presence.d.ts +4 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/presence.js +23 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateCrypto.d.ts +17 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateCrypto.js +40 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateMessage.d.ts +23 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/privateMessage.js +74 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/profile.d.ts +4 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/profile.js +41 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.js +106 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialConfig.d.ts +100 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialConfig.js +300 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialMessage.d.ts +19 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialMessage.js +69 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialResolver.d.ts +46 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialResolver.js +237 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialTemplate.d.ts +2 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/socialTemplate.js +90 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/types.d.ts +99 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/types.js +2 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/index.d.ts +3 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/index.js +19 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/jsonRepo.d.ts +7 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/jsonRepo.js +29 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/repos.d.ts +73 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/repos.js +85 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/socialRuntimeRepo.d.ts +5 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/socialRuntimeRepo.js +57 -0
- package/node_modules/@silicaclaw/storage/dist/socialRuntimeRepo.js +8 -4
- package/node_modules/@silicaclaw/storage/src/repos.ts +31 -1
- package/node_modules/@silicaclaw/storage/src/socialRuntimeRepo.ts +5 -4
- package/node_modules/@silicaclaw/storage/tsconfig.json +1 -6
- package/openclaw-skills/silicaclaw-bridge-setup/SKILL.md +165 -0
- package/openclaw-skills/silicaclaw-bridge-setup/VERSION +1 -0
- package/openclaw-skills/silicaclaw-bridge-setup/agents/openai.yaml +6 -0
- package/openclaw-skills/silicaclaw-bridge-setup/manifest.json +27 -0
- package/openclaw-skills/silicaclaw-bridge-setup/references/owner-dialogue-cheatsheet-zh.md +58 -0
- package/openclaw-skills/silicaclaw-bridge-setup/references/runtime-setup.md +43 -0
- package/openclaw-skills/silicaclaw-bridge-setup/references/troubleshooting.md +24 -0
- package/openclaw-skills/silicaclaw-broadcast/SKILL.md +150 -0
- package/openclaw-skills/silicaclaw-broadcast/VERSION +1 -1
- package/openclaw-skills/silicaclaw-broadcast/agents/openai.yaml +2 -2
- package/openclaw-skills/silicaclaw-broadcast/manifest.json +4 -3
- package/openclaw-skills/silicaclaw-broadcast/references/owner-dialogue-cheatsheet-zh.md +81 -0
- package/openclaw-skills/silicaclaw-network-config/SKILL.md +158 -0
- package/openclaw-skills/silicaclaw-network-config/VERSION +1 -0
- package/openclaw-skills/silicaclaw-network-config/agents/openai.yaml +6 -0
- package/openclaw-skills/silicaclaw-network-config/manifest.json +27 -0
- package/openclaw-skills/silicaclaw-network-config/references/network-modes.md +22 -0
- package/openclaw-skills/silicaclaw-network-config/references/owner-dialogue-cheatsheet-zh.md +47 -0
- package/openclaw-skills/silicaclaw-network-config/references/public-discovery.md +22 -0
- package/openclaw-skills/silicaclaw-owner-push/SKILL.md +235 -0
- package/openclaw-skills/silicaclaw-owner-push/VERSION +1 -0
- package/openclaw-skills/silicaclaw-owner-push/agents/openai.yaml +6 -0
- package/openclaw-skills/silicaclaw-owner-push/manifest.json +30 -0
- package/openclaw-skills/silicaclaw-owner-push/references/owner-dialogue-cheatsheet-zh.md +87 -0
- package/openclaw-skills/silicaclaw-owner-push/references/push-routing-policy.md +43 -0
- package/openclaw-skills/silicaclaw-owner-push/references/runtime-setup.md +44 -0
- package/openclaw-skills/silicaclaw-owner-push/scripts/owner-push-forwarder.mjs +356 -0
- package/openclaw-skills/silicaclaw-owner-push/scripts/send-to-owner-via-openclaw.mjs +69 -0
- package/package.json +5 -1
- package/packages/core/dist/config/silicaclaw-defaults.json +19 -0
- package/packages/core/dist/packages/core/src/crypto.d.ts +6 -0
- package/packages/core/dist/packages/core/src/crypto.js +50 -0
- package/packages/core/dist/packages/core/src/directory.d.ts +17 -0
- package/packages/core/dist/packages/core/src/directory.js +145 -0
- package/packages/core/dist/packages/core/src/identity.d.ts +2 -0
- package/packages/core/dist/packages/core/src/identity.js +18 -0
- package/packages/core/dist/packages/core/src/index.d.ts +14 -0
- package/packages/core/dist/packages/core/src/index.js +30 -0
- package/packages/core/dist/packages/core/src/indexing.d.ts +6 -0
- package/packages/core/dist/packages/core/src/indexing.js +43 -0
- package/packages/core/dist/packages/core/src/presence.d.ts +4 -0
- package/packages/core/dist/packages/core/src/presence.js +23 -0
- package/packages/core/dist/packages/core/src/privateCrypto.d.ts +17 -0
- package/packages/core/dist/packages/core/src/privateCrypto.js +40 -0
- package/packages/core/dist/packages/core/src/privateMessage.d.ts +23 -0
- package/packages/core/dist/packages/core/src/privateMessage.js +74 -0
- package/packages/core/dist/packages/core/src/profile.d.ts +4 -0
- package/packages/core/dist/packages/core/src/profile.js +41 -0
- package/packages/core/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
- package/packages/core/dist/packages/core/src/publicProfileSummary.js +106 -0
- package/packages/core/dist/packages/core/src/socialConfig.d.ts +100 -0
- package/packages/core/dist/packages/core/src/socialConfig.js +300 -0
- package/packages/core/dist/packages/core/src/socialMessage.d.ts +19 -0
- package/packages/core/dist/packages/core/src/socialMessage.js +69 -0
- package/packages/core/dist/packages/core/src/socialResolver.d.ts +46 -0
- package/packages/core/dist/packages/core/src/socialResolver.js +237 -0
- package/packages/core/dist/packages/core/src/socialTemplate.d.ts +2 -0
- package/packages/core/dist/packages/core/src/socialTemplate.js +90 -0
- package/packages/core/dist/packages/core/src/types.d.ts +99 -0
- package/packages/core/dist/packages/core/src/types.js +2 -0
- package/packages/core/src/index.ts +2 -0
- package/packages/core/src/privateCrypto.ts +57 -0
- package/packages/core/src/privateMessage.ts +101 -0
- package/packages/core/src/profile.ts +2 -0
- package/packages/core/src/publicProfileSummary.ts +7 -0
- package/packages/core/src/socialConfig.ts +7 -5
- package/packages/core/src/types.ts +44 -0
- package/packages/network/dist/config/silicaclaw-defaults.json +19 -0
- package/packages/network/dist/packages/network/src/abstractions/messageEnvelope.d.ts +28 -0
- package/packages/network/dist/packages/network/src/abstractions/messageEnvelope.js +36 -0
- package/packages/network/dist/packages/network/src/abstractions/peerDiscovery.d.ts +43 -0
- package/packages/network/dist/packages/network/src/abstractions/peerDiscovery.js +2 -0
- package/packages/network/dist/packages/network/src/abstractions/topicCodec.d.ts +4 -0
- package/packages/network/dist/packages/network/src/abstractions/topicCodec.js +2 -0
- package/packages/network/dist/packages/network/src/abstractions/transport.d.ts +36 -0
- package/packages/network/dist/packages/network/src/abstractions/transport.js +2 -0
- package/packages/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.d.ts +5 -0
- package/packages/network/dist/packages/network/src/codec/jsonMessageEnvelopeCodec.js +24 -0
- package/packages/network/dist/packages/network/src/codec/jsonTopicCodec.d.ts +5 -0
- package/packages/network/dist/packages/network/src/codec/jsonTopicCodec.js +12 -0
- package/packages/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.d.ts +28 -0
- package/packages/network/dist/packages/network/src/discovery/heartbeatPeerDiscovery.js +144 -0
- package/packages/network/dist/packages/network/src/index.d.ts +14 -0
- package/packages/network/dist/packages/network/src/index.js +30 -0
- package/packages/network/dist/packages/network/src/localEventBus.d.ts +9 -0
- package/packages/network/dist/packages/network/src/localEventBus.js +47 -0
- package/packages/network/dist/packages/network/src/mock.d.ts +8 -0
- package/packages/network/dist/packages/network/src/mock.js +24 -0
- package/packages/network/dist/packages/network/src/realPreview.d.ts +105 -0
- package/packages/network/dist/packages/network/src/realPreview.js +331 -0
- package/packages/network/dist/packages/network/src/relayPreview.d.ts +178 -0
- package/packages/network/dist/packages/network/src/relayPreview.js +548 -0
- package/packages/network/dist/packages/network/src/transport/udpLanBroadcastTransport.d.ts +23 -0
- package/packages/network/dist/packages/network/src/transport/udpLanBroadcastTransport.js +154 -0
- package/packages/network/dist/packages/network/src/types.d.ts +10 -0
- package/packages/network/dist/packages/network/src/types.js +2 -0
- package/packages/network/dist/packages/network/src/webrtcPreview.d.ts +163 -0
- package/packages/network/dist/packages/network/src/webrtcPreview.js +848 -0
- package/packages/network/src/realPreview.ts +3 -2
- package/packages/network/src/relayPreview.ts +125 -12
- package/packages/network/src/transport/udpLanBroadcastTransport.ts +2 -1
- package/packages/network/src/types.ts +2 -0
- package/packages/network/src/webrtcPreview.ts +2 -1
- package/packages/storage/config/silicaclaw-defaults.json +19 -0
- package/packages/storage/dist/config/silicaclaw-defaults.json +19 -0
- package/packages/storage/dist/packages/core/src/crypto.d.ts +6 -0
- package/packages/storage/dist/packages/core/src/crypto.js +50 -0
- package/packages/storage/dist/packages/core/src/directory.d.ts +17 -0
- package/packages/storage/dist/packages/core/src/directory.js +145 -0
- package/packages/storage/dist/packages/core/src/identity.d.ts +2 -0
- package/packages/storage/dist/packages/core/src/identity.js +18 -0
- package/packages/storage/dist/packages/core/src/index.d.ts +14 -0
- package/packages/storage/dist/packages/core/src/index.js +30 -0
- package/packages/storage/dist/packages/core/src/indexing.d.ts +6 -0
- package/packages/storage/dist/packages/core/src/indexing.js +43 -0
- package/packages/storage/dist/packages/core/src/presence.d.ts +4 -0
- package/packages/storage/dist/packages/core/src/presence.js +23 -0
- package/packages/storage/dist/packages/core/src/privateCrypto.d.ts +17 -0
- package/packages/storage/dist/packages/core/src/privateCrypto.js +40 -0
- package/packages/storage/dist/packages/core/src/privateMessage.d.ts +23 -0
- package/packages/storage/dist/packages/core/src/privateMessage.js +74 -0
- package/packages/storage/dist/packages/core/src/profile.d.ts +4 -0
- package/packages/storage/dist/packages/core/src/profile.js +41 -0
- package/packages/storage/dist/packages/core/src/publicProfileSummary.d.ts +74 -0
- package/packages/storage/dist/packages/core/src/publicProfileSummary.js +106 -0
- package/packages/storage/dist/packages/core/src/socialConfig.d.ts +100 -0
- package/packages/storage/dist/packages/core/src/socialConfig.js +300 -0
- package/packages/storage/dist/packages/core/src/socialMessage.d.ts +19 -0
- package/packages/storage/dist/packages/core/src/socialMessage.js +69 -0
- package/packages/storage/dist/packages/core/src/socialResolver.d.ts +46 -0
- package/packages/storage/dist/packages/core/src/socialResolver.js +237 -0
- package/packages/storage/dist/packages/core/src/socialTemplate.d.ts +2 -0
- package/packages/storage/dist/packages/core/src/socialTemplate.js +90 -0
- package/packages/storage/dist/packages/core/src/types.d.ts +99 -0
- package/packages/storage/dist/packages/core/src/types.js +2 -0
- package/packages/storage/dist/packages/storage/config/silicaclaw-defaults.json +19 -0
- package/packages/storage/dist/packages/storage/src/index.d.ts +3 -0
- package/packages/storage/dist/packages/storage/src/index.js +19 -0
- package/packages/storage/dist/packages/storage/src/jsonRepo.d.ts +7 -0
- package/packages/storage/dist/packages/storage/src/jsonRepo.js +29 -0
- package/packages/storage/dist/packages/storage/src/repos.d.ts +73 -0
- package/packages/storage/dist/packages/storage/src/repos.js +85 -0
- package/packages/storage/dist/packages/storage/src/socialRuntimeRepo.d.ts +5 -0
- package/packages/storage/dist/packages/storage/src/socialRuntimeRepo.js +57 -0
- package/packages/storage/dist/socialRuntimeRepo.js +8 -4
- package/packages/storage/src/repos.ts +31 -1
- package/packages/storage/src/socialRuntimeRepo.ts +5 -4
- package/packages/storage/tsconfig.json +1 -6
- package/scripts/functional-check.mjs +35 -6
- package/scripts/install-openclaw-skill.mjs +9 -2
- package/scripts/openclaw-bridge-adapter.mjs +3 -1
- package/scripts/openclaw-bridge-client.mjs +3 -1
- package/scripts/openclaw-runtime-demo.mjs +3 -1
- package/scripts/quickstart.sh +14 -10
- package/scripts/release-pack.mjs +59 -1
- package/scripts/silicaclaw-cli.mjs +166 -51
- package/scripts/silicaclaw-gateway.mjs +410 -84
- package/scripts/validate-openclaw-skill.mjs +98 -21
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeTag = normalizeTag;
|
|
4
|
+
exports.buildTagIndexKeys = buildTagIndexKeys;
|
|
5
|
+
exports.buildNamePrefixKeys = buildNamePrefixKeys;
|
|
6
|
+
exports.buildIndexKeys = buildIndexKeys;
|
|
7
|
+
exports.buildIndexRecords = buildIndexRecords;
|
|
8
|
+
function normalizeTag(tag) {
|
|
9
|
+
return tag.trim().toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
function buildTagIndexKeys(tags) {
|
|
12
|
+
return tags
|
|
13
|
+
.map(normalizeTag)
|
|
14
|
+
.filter(Boolean)
|
|
15
|
+
.map((tag) => `tag:${tag}`);
|
|
16
|
+
}
|
|
17
|
+
function buildNamePrefixKeys(displayName) {
|
|
18
|
+
const normalized = displayName.trim().toLowerCase().replace(/\s+/g, " ");
|
|
19
|
+
const collapsed = normalized.replace(/[^a-z0-9]+/g, "");
|
|
20
|
+
const source = collapsed || normalized.replace(/\s+/g, "");
|
|
21
|
+
const keys = [];
|
|
22
|
+
for (let i = 1; i <= source.length; i += 1) {
|
|
23
|
+
keys.push(`name:${source.slice(0, i)}`);
|
|
24
|
+
}
|
|
25
|
+
return keys;
|
|
26
|
+
}
|
|
27
|
+
function buildIndexKeys(profile) {
|
|
28
|
+
const keys = new Set();
|
|
29
|
+
for (const key of buildTagIndexKeys(profile.tags)) {
|
|
30
|
+
keys.add(key);
|
|
31
|
+
}
|
|
32
|
+
for (const key of buildNamePrefixKeys(profile.display_name)) {
|
|
33
|
+
keys.add(key);
|
|
34
|
+
}
|
|
35
|
+
return Array.from(keys);
|
|
36
|
+
}
|
|
37
|
+
function buildIndexRecords(profile) {
|
|
38
|
+
return buildIndexKeys(profile).map((key) => ({
|
|
39
|
+
type: "index",
|
|
40
|
+
key,
|
|
41
|
+
agent_id: profile.agent_id,
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AgentIdentity } from "./types";
|
|
2
|
+
import { PresenceRecord } from "./types";
|
|
3
|
+
export declare function signPresence(identity: AgentIdentity, timestamp?: number): PresenceRecord;
|
|
4
|
+
export declare function verifyPresence(record: PresenceRecord, publicKey: string): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.signPresence = signPresence;
|
|
4
|
+
exports.verifyPresence = verifyPresence;
|
|
5
|
+
const crypto_1 = require("./crypto");
|
|
6
|
+
function unsignedPresence(record) {
|
|
7
|
+
const { signature: _signature, ...rest } = record;
|
|
8
|
+
return rest;
|
|
9
|
+
}
|
|
10
|
+
function signPresence(identity, timestamp = Date.now()) {
|
|
11
|
+
const payload = {
|
|
12
|
+
type: "presence",
|
|
13
|
+
agent_id: identity.agent_id,
|
|
14
|
+
timestamp,
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
...payload,
|
|
18
|
+
signature: (0, crypto_1.signPayload)(payload, identity.private_key),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function verifyPresence(record, publicKey) {
|
|
22
|
+
return (0, crypto_1.verifyPayload)(unsignedPresence(record), record.signature, publicKey);
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PrivateEncryptionKeyPair } from "./types";
|
|
2
|
+
export declare function createPrivateEncryptionKeyPair(now?: number): PrivateEncryptionKeyPair;
|
|
3
|
+
export declare function encryptPrivatePayload(input: {
|
|
4
|
+
plaintext: string;
|
|
5
|
+
recipient_public_key: string;
|
|
6
|
+
sender_keypair?: PrivateEncryptionKeyPair | null;
|
|
7
|
+
}): {
|
|
8
|
+
ciphertext: string;
|
|
9
|
+
nonce: string;
|
|
10
|
+
sender_encryption_public_key: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function decryptPrivatePayload(input: {
|
|
13
|
+
ciphertext: string;
|
|
14
|
+
nonce: string;
|
|
15
|
+
sender_encryption_public_key: string;
|
|
16
|
+
recipient_private_key: string;
|
|
17
|
+
}): string | null;
|
|
@@ -0,0 +1,40 @@
|
|
|
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.createPrivateEncryptionKeyPair = createPrivateEncryptionKeyPair;
|
|
7
|
+
exports.encryptPrivatePayload = encryptPrivatePayload;
|
|
8
|
+
exports.decryptPrivatePayload = decryptPrivatePayload;
|
|
9
|
+
const tweetnacl_1 = __importDefault(require("tweetnacl"));
|
|
10
|
+
const crypto_1 = require("./crypto");
|
|
11
|
+
function createPrivateEncryptionKeyPair(now = Date.now()) {
|
|
12
|
+
const pair = tweetnacl_1.default.box.keyPair();
|
|
13
|
+
return {
|
|
14
|
+
public_key: (0, crypto_1.toBase64)(pair.publicKey),
|
|
15
|
+
private_key: (0, crypto_1.toBase64)(pair.secretKey),
|
|
16
|
+
created_at: now,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function encryptPrivatePayload(input) {
|
|
20
|
+
const sender = input.sender_keypair || createPrivateEncryptionKeyPair();
|
|
21
|
+
const nonce = tweetnacl_1.default.randomBytes(tweetnacl_1.default.box.nonceLength);
|
|
22
|
+
const message = Buffer.from(String(input.plaintext || ""), "utf8");
|
|
23
|
+
const ciphertext = tweetnacl_1.default.box(new Uint8Array(message), nonce, (0, crypto_1.fromBase64)(input.recipient_public_key), (0, crypto_1.fromBase64)(sender.private_key));
|
|
24
|
+
return {
|
|
25
|
+
ciphertext: (0, crypto_1.toBase64)(ciphertext),
|
|
26
|
+
nonce: (0, crypto_1.toBase64)(nonce),
|
|
27
|
+
sender_encryption_public_key: sender.public_key,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function decryptPrivatePayload(input) {
|
|
31
|
+
try {
|
|
32
|
+
const opened = tweetnacl_1.default.box.open((0, crypto_1.fromBase64)(input.ciphertext), (0, crypto_1.fromBase64)(input.nonce), (0, crypto_1.fromBase64)(input.sender_encryption_public_key), (0, crypto_1.fromBase64)(input.recipient_private_key));
|
|
33
|
+
if (!opened)
|
|
34
|
+
return null;
|
|
35
|
+
return Buffer.from(opened).toString("utf8");
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentIdentity, PrivateMessageReceiptRecord, PrivateMessageRecord } from "./types";
|
|
2
|
+
export declare function signPrivateMessage(input: {
|
|
3
|
+
identity: AgentIdentity;
|
|
4
|
+
message_id: string;
|
|
5
|
+
conversation_id: string;
|
|
6
|
+
to_agent_id: string;
|
|
7
|
+
sender_encryption_public_key: string;
|
|
8
|
+
recipient_encryption_public_key: string;
|
|
9
|
+
ciphertext: string;
|
|
10
|
+
nonce: string;
|
|
11
|
+
created_at?: number;
|
|
12
|
+
}): PrivateMessageRecord;
|
|
13
|
+
export declare function verifyPrivateMessage(record: PrivateMessageRecord): boolean;
|
|
14
|
+
export declare function signPrivateMessageReceipt(input: {
|
|
15
|
+
identity: AgentIdentity;
|
|
16
|
+
receipt_id: string;
|
|
17
|
+
message_id: string;
|
|
18
|
+
conversation_id: string;
|
|
19
|
+
to_agent_id: string;
|
|
20
|
+
status: "received" | "read";
|
|
21
|
+
created_at?: number;
|
|
22
|
+
}): PrivateMessageReceiptRecord;
|
|
23
|
+
export declare function verifyPrivateMessageReceipt(record: PrivateMessageReceiptRecord): boolean;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.signPrivateMessage = signPrivateMessage;
|
|
4
|
+
exports.verifyPrivateMessage = verifyPrivateMessage;
|
|
5
|
+
exports.signPrivateMessageReceipt = signPrivateMessageReceipt;
|
|
6
|
+
exports.verifyPrivateMessageReceipt = verifyPrivateMessageReceipt;
|
|
7
|
+
const crypto_1 = require("./crypto");
|
|
8
|
+
function unsignedPrivateMessage(record) {
|
|
9
|
+
const { signature: _signature, ...rest } = record;
|
|
10
|
+
return rest;
|
|
11
|
+
}
|
|
12
|
+
function unsignedPrivateMessageReceipt(record) {
|
|
13
|
+
const { signature: _signature, ...rest } = record;
|
|
14
|
+
return rest;
|
|
15
|
+
}
|
|
16
|
+
function signPrivateMessage(input) {
|
|
17
|
+
const payload = {
|
|
18
|
+
type: "private.message",
|
|
19
|
+
message_id: input.message_id,
|
|
20
|
+
conversation_id: input.conversation_id,
|
|
21
|
+
from_agent_id: input.identity.agent_id,
|
|
22
|
+
to_agent_id: input.to_agent_id,
|
|
23
|
+
sender_public_key: input.identity.public_key,
|
|
24
|
+
sender_encryption_public_key: input.sender_encryption_public_key,
|
|
25
|
+
recipient_encryption_public_key: input.recipient_encryption_public_key,
|
|
26
|
+
cipher_scheme: "nacl-box-v1",
|
|
27
|
+
ciphertext: input.ciphertext,
|
|
28
|
+
nonce: input.nonce,
|
|
29
|
+
created_at: input.created_at ?? Date.now(),
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
...payload,
|
|
33
|
+
signature: (0, crypto_1.signPayload)(payload, input.identity.private_key),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function verifyPrivateMessage(record) {
|
|
37
|
+
try {
|
|
38
|
+
if ((0, crypto_1.hashPublicKey)((0, crypto_1.fromBase64)(record.sender_public_key)) !== record.from_agent_id) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return (0, crypto_1.verifyPayload)(unsignedPrivateMessage(record), record.signature, record.sender_public_key);
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function signPrivateMessageReceipt(input) {
|
|
48
|
+
const payload = {
|
|
49
|
+
type: "private.message.receipt",
|
|
50
|
+
receipt_id: input.receipt_id,
|
|
51
|
+
message_id: input.message_id,
|
|
52
|
+
conversation_id: input.conversation_id,
|
|
53
|
+
from_agent_id: input.identity.agent_id,
|
|
54
|
+
to_agent_id: input.to_agent_id,
|
|
55
|
+
sender_public_key: input.identity.public_key,
|
|
56
|
+
status: input.status,
|
|
57
|
+
created_at: input.created_at ?? Date.now(),
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
...payload,
|
|
61
|
+
signature: (0, crypto_1.signPayload)(payload, input.identity.private_key),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function verifyPrivateMessageReceipt(record) {
|
|
65
|
+
try {
|
|
66
|
+
if ((0, crypto_1.hashPublicKey)((0, crypto_1.fromBase64)(record.sender_public_key)) !== record.from_agent_id) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return (0, crypto_1.verifyPayload)(unsignedPrivateMessageReceipt(record), record.signature, record.sender_public_key);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AgentIdentity, ProfileInput, PublicProfile } from "./types";
|
|
2
|
+
export declare function signProfile(input: ProfileInput, identity: AgentIdentity): PublicProfile;
|
|
3
|
+
export declare function verifyProfile(profile: PublicProfile, publicKey: string): boolean;
|
|
4
|
+
export declare function createDefaultProfileInput(agentId: string): ProfileInput;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.signProfile = signProfile;
|
|
4
|
+
exports.verifyProfile = verifyProfile;
|
|
5
|
+
exports.createDefaultProfileInput = createDefaultProfileInput;
|
|
6
|
+
const crypto_1 = require("./crypto");
|
|
7
|
+
function payloadWithoutSignature(profile) {
|
|
8
|
+
const { signature: _signature, ...payload } = profile;
|
|
9
|
+
return payload;
|
|
10
|
+
}
|
|
11
|
+
function signProfile(input, identity) {
|
|
12
|
+
const unsigned = {
|
|
13
|
+
agent_id: input.agent_id,
|
|
14
|
+
display_name: input.display_name,
|
|
15
|
+
bio: input.bio,
|
|
16
|
+
tags: input.tags,
|
|
17
|
+
avatar_url: input.avatar_url,
|
|
18
|
+
private_encryption_public_key: input.private_encryption_public_key,
|
|
19
|
+
public_enabled: input.public_enabled,
|
|
20
|
+
updated_at: Date.now(),
|
|
21
|
+
};
|
|
22
|
+
const signature = (0, crypto_1.signPayload)(unsigned, identity.private_key);
|
|
23
|
+
return {
|
|
24
|
+
...unsigned,
|
|
25
|
+
signature,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function verifyProfile(profile, publicKey) {
|
|
29
|
+
return (0, crypto_1.verifyPayload)(payloadWithoutSignature(profile), profile.signature, publicKey);
|
|
30
|
+
}
|
|
31
|
+
function createDefaultProfileInput(agentId) {
|
|
32
|
+
return {
|
|
33
|
+
agent_id: agentId,
|
|
34
|
+
display_name: "",
|
|
35
|
+
bio: "",
|
|
36
|
+
tags: [],
|
|
37
|
+
avatar_url: "",
|
|
38
|
+
private_encryption_public_key: "",
|
|
39
|
+
public_enabled: false,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { PublicProfile } from "./types";
|
|
2
|
+
export type CapabilityKey = "browser" | "computer" | "research" | "openclaw";
|
|
3
|
+
export type ProfileVisibility = {
|
|
4
|
+
show_tags: boolean;
|
|
5
|
+
show_last_seen: boolean;
|
|
6
|
+
show_capabilities_summary: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type PublicProfileSummary = {
|
|
9
|
+
agent_id: string;
|
|
10
|
+
is_self: boolean;
|
|
11
|
+
display_name: string;
|
|
12
|
+
bio: string;
|
|
13
|
+
avatar_url?: string;
|
|
14
|
+
private_encryption_public_key?: string;
|
|
15
|
+
public_enabled: boolean;
|
|
16
|
+
updated_at: number;
|
|
17
|
+
online: boolean;
|
|
18
|
+
last_seen_at: number | null;
|
|
19
|
+
tags: string[];
|
|
20
|
+
network_mode: string;
|
|
21
|
+
openclaw_bound: boolean;
|
|
22
|
+
capabilities_summary: string[];
|
|
23
|
+
profile_version: string;
|
|
24
|
+
public_key_fingerprint: string | null;
|
|
25
|
+
profile_updated_at: number;
|
|
26
|
+
presence_seen_at: number | null;
|
|
27
|
+
freshness_status: "live" | "recently_seen" | "stale";
|
|
28
|
+
verified_profile: boolean;
|
|
29
|
+
verified_presence_recent: boolean;
|
|
30
|
+
verification_status: "verified" | "stale" | "unverified";
|
|
31
|
+
signed_claims: {
|
|
32
|
+
display_name: string;
|
|
33
|
+
bio: string;
|
|
34
|
+
avatar_url?: string;
|
|
35
|
+
private_encryption_public_key?: string;
|
|
36
|
+
tags: string[];
|
|
37
|
+
public_enabled: boolean;
|
|
38
|
+
profile_version: string;
|
|
39
|
+
profile_updated_at: number;
|
|
40
|
+
public_key_fingerprint: string | null;
|
|
41
|
+
verified_profile: boolean;
|
|
42
|
+
};
|
|
43
|
+
observed_state: {
|
|
44
|
+
online: boolean;
|
|
45
|
+
freshness_status: "live" | "recently_seen" | "stale";
|
|
46
|
+
presence_seen_at: number | null;
|
|
47
|
+
verified_presence_recent: boolean;
|
|
48
|
+
};
|
|
49
|
+
integration_metadata: {
|
|
50
|
+
network_mode: string;
|
|
51
|
+
openclaw_bound: boolean;
|
|
52
|
+
verification_status: "verified" | "stale" | "unverified";
|
|
53
|
+
};
|
|
54
|
+
public_visibility: {
|
|
55
|
+
visible_fields: string[];
|
|
56
|
+
hidden_fields: string[];
|
|
57
|
+
};
|
|
58
|
+
visibility: ProfileVisibility;
|
|
59
|
+
};
|
|
60
|
+
export declare function deriveCapabilitiesSummary(tags: string[]): string[];
|
|
61
|
+
export declare function buildPublicProfileSummary(args: {
|
|
62
|
+
profile: PublicProfile;
|
|
63
|
+
is_self?: boolean;
|
|
64
|
+
online: boolean;
|
|
65
|
+
last_seen_at: number | null;
|
|
66
|
+
network_mode?: string;
|
|
67
|
+
openclaw_bound?: boolean;
|
|
68
|
+
visibility?: Partial<ProfileVisibility>;
|
|
69
|
+
profile_version?: string;
|
|
70
|
+
public_key_fingerprint?: string | null;
|
|
71
|
+
verified_profile?: boolean;
|
|
72
|
+
now?: number;
|
|
73
|
+
presence_ttl_ms?: number;
|
|
74
|
+
}): PublicProfileSummary;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deriveCapabilitiesSummary = deriveCapabilitiesSummary;
|
|
4
|
+
exports.buildPublicProfileSummary = buildPublicProfileSummary;
|
|
5
|
+
const DEFAULT_VISIBILITY = {
|
|
6
|
+
show_tags: true,
|
|
7
|
+
show_last_seen: true,
|
|
8
|
+
show_capabilities_summary: true,
|
|
9
|
+
};
|
|
10
|
+
const CAPABILITY_KEYS = ["browser", "computer", "research", "openclaw"];
|
|
11
|
+
function deriveCapabilitiesSummary(tags) {
|
|
12
|
+
const normalized = new Set(tags.map((tag) => String(tag).trim().toLowerCase()).filter(Boolean));
|
|
13
|
+
return CAPABILITY_KEYS.filter((key) => normalized.has(key));
|
|
14
|
+
}
|
|
15
|
+
function buildPublicProfileSummary(args) {
|
|
16
|
+
const visibility = {
|
|
17
|
+
show_tags: typeof args.visibility?.show_tags === "boolean"
|
|
18
|
+
? args.visibility.show_tags
|
|
19
|
+
: DEFAULT_VISIBILITY.show_tags,
|
|
20
|
+
show_last_seen: typeof args.visibility?.show_last_seen === "boolean"
|
|
21
|
+
? args.visibility.show_last_seen
|
|
22
|
+
: DEFAULT_VISIBILITY.show_last_seen,
|
|
23
|
+
show_capabilities_summary: typeof args.visibility?.show_capabilities_summary === "boolean"
|
|
24
|
+
? args.visibility.show_capabilities_summary
|
|
25
|
+
: DEFAULT_VISIBILITY.show_capabilities_summary,
|
|
26
|
+
};
|
|
27
|
+
const tags = visibility.show_tags ? args.profile.tags : [];
|
|
28
|
+
const capabilities = visibility.show_capabilities_summary ? deriveCapabilitiesSummary(args.profile.tags) : [];
|
|
29
|
+
const now = Number.isFinite(args.now) ? Number(args.now) : Date.now();
|
|
30
|
+
const ttl = Number.isFinite(args.presence_ttl_ms) ? Number(args.presence_ttl_ms) : 30_000;
|
|
31
|
+
const age = args.last_seen_at ? Math.max(0, now - args.last_seen_at) : Number.POSITIVE_INFINITY;
|
|
32
|
+
const freshness_status = age <= ttl ? "live" : age <= ttl * 3 ? "recently_seen" : "stale";
|
|
33
|
+
const verified_profile = Boolean(args.verified_profile);
|
|
34
|
+
const verified_presence_recent = freshness_status !== "stale" && Boolean(args.last_seen_at);
|
|
35
|
+
const verification_status = !verified_profile
|
|
36
|
+
? "unverified"
|
|
37
|
+
: verified_presence_recent
|
|
38
|
+
? "verified"
|
|
39
|
+
: "stale";
|
|
40
|
+
const visible_fields = [
|
|
41
|
+
"display_name",
|
|
42
|
+
"bio",
|
|
43
|
+
"public_enabled",
|
|
44
|
+
"profile_updated_at",
|
|
45
|
+
visibility.show_tags ? "tags" : "",
|
|
46
|
+
visibility.show_last_seen ? "presence_seen_at" : "",
|
|
47
|
+
visibility.show_capabilities_summary ? "capabilities_summary" : "",
|
|
48
|
+
].filter((field) => Boolean(field));
|
|
49
|
+
const hidden_fields = [
|
|
50
|
+
visibility.show_tags ? "" : "tags",
|
|
51
|
+
visibility.show_last_seen ? "" : "presence_seen_at",
|
|
52
|
+
visibility.show_capabilities_summary ? "" : "capabilities_summary",
|
|
53
|
+
].filter((field) => Boolean(field));
|
|
54
|
+
return {
|
|
55
|
+
agent_id: args.profile.agent_id,
|
|
56
|
+
is_self: Boolean(args.is_self),
|
|
57
|
+
display_name: args.profile.display_name,
|
|
58
|
+
bio: args.profile.bio,
|
|
59
|
+
avatar_url: args.profile.avatar_url,
|
|
60
|
+
private_encryption_public_key: args.profile.private_encryption_public_key,
|
|
61
|
+
public_enabled: args.profile.public_enabled,
|
|
62
|
+
updated_at: args.profile.updated_at,
|
|
63
|
+
online: args.online,
|
|
64
|
+
last_seen_at: visibility.show_last_seen ? args.last_seen_at : null,
|
|
65
|
+
tags,
|
|
66
|
+
network_mode: args.network_mode ?? "unknown",
|
|
67
|
+
openclaw_bound: Boolean(args.openclaw_bound),
|
|
68
|
+
capabilities_summary: capabilities,
|
|
69
|
+
profile_version: args.profile_version ?? "v1",
|
|
70
|
+
public_key_fingerprint: args.public_key_fingerprint ?? null,
|
|
71
|
+
profile_updated_at: args.profile.updated_at,
|
|
72
|
+
presence_seen_at: visibility.show_last_seen ? args.last_seen_at : null,
|
|
73
|
+
freshness_status,
|
|
74
|
+
verified_profile,
|
|
75
|
+
verified_presence_recent,
|
|
76
|
+
verification_status,
|
|
77
|
+
signed_claims: {
|
|
78
|
+
display_name: args.profile.display_name,
|
|
79
|
+
bio: args.profile.bio,
|
|
80
|
+
avatar_url: args.profile.avatar_url,
|
|
81
|
+
private_encryption_public_key: args.profile.private_encryption_public_key,
|
|
82
|
+
tags,
|
|
83
|
+
public_enabled: args.profile.public_enabled,
|
|
84
|
+
profile_version: args.profile_version ?? "v1",
|
|
85
|
+
profile_updated_at: args.profile.updated_at,
|
|
86
|
+
public_key_fingerprint: args.public_key_fingerprint ?? null,
|
|
87
|
+
verified_profile,
|
|
88
|
+
},
|
|
89
|
+
observed_state: {
|
|
90
|
+
online: args.online,
|
|
91
|
+
freshness_status,
|
|
92
|
+
presence_seen_at: visibility.show_last_seen ? args.last_seen_at : null,
|
|
93
|
+
verified_presence_recent,
|
|
94
|
+
},
|
|
95
|
+
integration_metadata: {
|
|
96
|
+
network_mode: args.network_mode ?? "unknown",
|
|
97
|
+
openclaw_bound: Boolean(args.openclaw_bound),
|
|
98
|
+
verification_status,
|
|
99
|
+
},
|
|
100
|
+
public_visibility: {
|
|
101
|
+
visible_fields,
|
|
102
|
+
hidden_fields,
|
|
103
|
+
},
|
|
104
|
+
visibility,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export type SocialIdentityConfig = {
|
|
2
|
+
display_name: string;
|
|
3
|
+
bio: string;
|
|
4
|
+
avatar_url: string;
|
|
5
|
+
tags: string[];
|
|
6
|
+
};
|
|
7
|
+
export type SocialNetworkAdapter = "mock" | "local-event-bus" | "real-preview" | "webrtc-preview" | "relay-preview";
|
|
8
|
+
export type SocialNetworkMode = "local" | "lan" | "global-preview";
|
|
9
|
+
export type SocialNetworkConfig = {
|
|
10
|
+
mode: SocialNetworkMode;
|
|
11
|
+
namespace: string;
|
|
12
|
+
adapter: SocialNetworkAdapter;
|
|
13
|
+
port: number;
|
|
14
|
+
signaling_url: string;
|
|
15
|
+
signaling_urls: string[];
|
|
16
|
+
room: string;
|
|
17
|
+
seed_peers: string[];
|
|
18
|
+
bootstrap_hints: string[];
|
|
19
|
+
};
|
|
20
|
+
export type SocialDiscoveryConfig = {
|
|
21
|
+
discoverable: boolean;
|
|
22
|
+
allow_profile_broadcast: boolean;
|
|
23
|
+
allow_presence_broadcast: boolean;
|
|
24
|
+
allow_message_broadcast: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type SocialVisibilityConfig = {
|
|
27
|
+
show_display_name: boolean;
|
|
28
|
+
show_bio: boolean;
|
|
29
|
+
show_tags: boolean;
|
|
30
|
+
show_agent_id: boolean;
|
|
31
|
+
show_last_seen: boolean;
|
|
32
|
+
show_capabilities_summary: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type SocialOpenClawConfig = {
|
|
35
|
+
bind_existing_identity: boolean;
|
|
36
|
+
use_openclaw_profile_if_available: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type SocialConfig = {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
public_enabled: boolean;
|
|
41
|
+
identity: SocialIdentityConfig;
|
|
42
|
+
network: SocialNetworkConfig;
|
|
43
|
+
discovery: SocialDiscoveryConfig;
|
|
44
|
+
visibility: SocialVisibilityConfig;
|
|
45
|
+
openclaw: SocialOpenClawConfig;
|
|
46
|
+
};
|
|
47
|
+
export type SocialLoadMeta = {
|
|
48
|
+
found: boolean;
|
|
49
|
+
source_path: string | null;
|
|
50
|
+
parse_error: string | null;
|
|
51
|
+
loaded_at: number;
|
|
52
|
+
};
|
|
53
|
+
export type SocialRuntimeConfig = {
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
public_enabled: boolean;
|
|
56
|
+
source_path: string | null;
|
|
57
|
+
last_loaded_at: number;
|
|
58
|
+
social_found: boolean;
|
|
59
|
+
parse_error: string | null;
|
|
60
|
+
resolved_identity: {
|
|
61
|
+
agent_id: string;
|
|
62
|
+
public_key: string;
|
|
63
|
+
created_at: number;
|
|
64
|
+
source: "silicaclaw-existing" | "openclaw-existing" | "silicaclaw-generated";
|
|
65
|
+
} | null;
|
|
66
|
+
resolved_profile: {
|
|
67
|
+
display_name: string;
|
|
68
|
+
bio: string;
|
|
69
|
+
avatar_url?: string;
|
|
70
|
+
tags: string[];
|
|
71
|
+
public_enabled: boolean;
|
|
72
|
+
} | null;
|
|
73
|
+
resolved_network: {
|
|
74
|
+
mode: SocialNetworkMode;
|
|
75
|
+
adapter: SocialNetworkAdapter;
|
|
76
|
+
namespace: string;
|
|
77
|
+
port: number | null;
|
|
78
|
+
signaling_url: string;
|
|
79
|
+
signaling_urls: string[];
|
|
80
|
+
room: string;
|
|
81
|
+
seed_peers: string[];
|
|
82
|
+
bootstrap_hints: string[];
|
|
83
|
+
bootstrap_sources: string[];
|
|
84
|
+
};
|
|
85
|
+
resolved_discovery: SocialDiscoveryConfig;
|
|
86
|
+
visibility: SocialVisibilityConfig;
|
|
87
|
+
openclaw: SocialOpenClawConfig;
|
|
88
|
+
};
|
|
89
|
+
export declare function parseFrontmatterObject(frontmatter: string): Record<string, unknown>;
|
|
90
|
+
export declare function extractFrontmatter(content: string): string | null;
|
|
91
|
+
export declare function normalizeSocialConfig(input: unknown): SocialConfig;
|
|
92
|
+
export declare function getDefaultSocialConfig(): SocialConfig;
|
|
93
|
+
export type DefaultSocialTemplateOptions = {
|
|
94
|
+
display_name?: string;
|
|
95
|
+
bio?: string;
|
|
96
|
+
tags?: string[];
|
|
97
|
+
mode?: SocialNetworkMode;
|
|
98
|
+
public_enabled?: boolean;
|
|
99
|
+
};
|
|
100
|
+
export declare function generateDefaultSocialMdTemplate(options?: DefaultSocialTemplateOptions): string;
|