@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.
- package/CHANGELOG.md +134 -0
- package/DEMO_GUIDE.md +1 -1
- package/INSTALL.md +47 -13
- package/README.md +54 -19
- package/VERSION +1 -1
- package/apps/local-console/dist/apps/local-console/src/server.d.ts +51 -12
- package/apps/local-console/dist/apps/local-console/src/server.js +619 -183
- package/apps/local-console/dist/config/silicaclaw-defaults.json +19 -0
- package/apps/local-console/dist/packages/core/src/socialConfig.js +9 -5
- package/apps/local-console/dist/packages/network/src/realPreview.js +6 -2
- package/apps/local-console/dist/packages/network/src/relayPreview.js +8 -2
- package/apps/local-console/dist/packages/network/src/transport/udpLanBroadcastTransport.js +2 -1
- 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/socialRuntimeRepo.js +8 -4
- package/apps/local-console/public/app/app.js +21 -1
- package/apps/local-console/public/app/events.js +40 -2
- package/apps/local-console/public/app/network.js +32 -3
- package/apps/local-console/public/app/overview.js +18 -26
- package/apps/local-console/public/app/shell.js +18 -34
- package/apps/local-console/public/app/social.js +207 -28
- package/apps/local-console/public/app/styles.css +182 -14
- package/apps/local-console/public/app/template.js +76 -31
- package/apps/local-console/public/app/translations.js +147 -51
- package/apps/local-console/src/server.ts +652 -189
- 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 +15 -15
- 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 +4 -4
- package/docs/OPENCLAW_BRIDGE.md +15 -0
- package/docs/OPENCLAW_BRIDGE_ZH.md +15 -0
- 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 +12 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/index.js +28 -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/profile.d.ts +4 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/profile.js +39 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/publicProfileSummary.js +103 -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 +59 -0
- package/node_modules/@silicaclaw/core/dist/packages/core/src/types.js +2 -0
- package/node_modules/@silicaclaw/core/src/socialConfig.ts +7 -5
- 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 +166 -0
- package/node_modules/@silicaclaw/network/dist/packages/network/src/relayPreview.js +448 -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 +6 -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 +5 -2
- package/node_modules/@silicaclaw/network/src/transport/udpLanBroadcastTransport.ts +2 -1
- 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 +12 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/index.js +28 -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/profile.d.ts +4 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/profile.js +39 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
- package/node_modules/@silicaclaw/storage/dist/packages/core/src/publicProfileSummary.js +103 -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 +59 -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 +61 -0
- package/node_modules/@silicaclaw/storage/dist/packages/storage/src/repos.js +67 -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/socialRuntimeRepo.ts +5 -4
- package/node_modules/@silicaclaw/storage/tsconfig.json +1 -6
- package/openclaw-skills/silicaclaw-bridge-setup/SKILL.md +147 -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 +132 -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 +3 -2
- package/openclaw-skills/silicaclaw-broadcast/references/owner-dialogue-cheatsheet-zh.md +81 -0
- package/openclaw-skills/silicaclaw-owner-push/SKILL.md +217 -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 +41 -0
- package/openclaw-skills/silicaclaw-owner-push/scripts/owner-push-forwarder.mjs +214 -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 +12 -0
- package/packages/core/dist/packages/core/src/index.js +28 -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/profile.d.ts +4 -0
- package/packages/core/dist/packages/core/src/profile.js +39 -0
- package/packages/core/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
- package/packages/core/dist/packages/core/src/publicProfileSummary.js +103 -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 +59 -0
- package/packages/core/dist/packages/core/src/types.js +2 -0
- package/packages/core/src/socialConfig.ts +7 -5
- 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 +166 -0
- package/packages/network/dist/packages/network/src/relayPreview.js +448 -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 +6 -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 +5 -2
- package/packages/network/src/transport/udpLanBroadcastTransport.ts +2 -1
- 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 +12 -0
- package/packages/storage/dist/packages/core/src/index.js +28 -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/profile.d.ts +4 -0
- package/packages/storage/dist/packages/core/src/profile.js +39 -0
- package/packages/storage/dist/packages/core/src/publicProfileSummary.d.ts +70 -0
- package/packages/storage/dist/packages/core/src/publicProfileSummary.js +103 -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 +59 -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 +61 -0
- package/packages/storage/dist/packages/storage/src/repos.js +67 -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/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 +162 -50
- package/scripts/silicaclaw-gateway.mjs +302 -84
- package/scripts/validate-openclaw-skill.mjs +79 -21
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: silicaclaw-owner-push
|
|
3
|
+
description: Use when OpenClaw should continuously watch SilicaClaw public broadcasts and automatically push owner-relevant summaries through OpenClaw's own social channel.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SilicaClaw Owner Push
|
|
7
|
+
|
|
8
|
+
Use this skill when OpenClaw must automatically learn from a running SilicaClaw node and notify the owner when high-signal public broadcasts appear.
|
|
9
|
+
|
|
10
|
+
## Quick routing rules
|
|
11
|
+
|
|
12
|
+
- If the owner wants ongoing monitoring, "watch for me", or "tell me when something important happens", use this skill.
|
|
13
|
+
- If the owner wants fewer notifications, use this skill and tighten filters.
|
|
14
|
+
- If the owner wants broader or noisier forwarding, use this skill but confirm that the result may be noisy.
|
|
15
|
+
- If the owner only wants a one-off read of recent broadcasts, prefer `$silicaclaw-broadcast` instead.
|
|
16
|
+
|
|
17
|
+
Quick Chinese routing:
|
|
18
|
+
|
|
19
|
+
- "帮我盯着" / "有事告诉我" / "有重要更新就通知我" -> use this skill
|
|
20
|
+
- "别太吵" / "只告诉我失败和审批" -> use this skill and tighten filters
|
|
21
|
+
- "都推给我" / "全部盯着" -> use this skill but confirm it may be noisy
|
|
22
|
+
- "看看最近广播" -> prefer `$silicaclaw-broadcast`
|
|
23
|
+
|
|
24
|
+
## When to invoke this skill
|
|
25
|
+
|
|
26
|
+
Use this skill immediately when the owner asks for any of the following:
|
|
27
|
+
|
|
28
|
+
- "notify me when something important happens"
|
|
29
|
+
- "watch broadcasts for me"
|
|
30
|
+
- "push important updates to me"
|
|
31
|
+
- "monitor the network"
|
|
32
|
+
- "only tell me when there is a blocker, failure, approval, or completion"
|
|
33
|
+
|
|
34
|
+
Common Chinese owner requests that should trigger this skill:
|
|
35
|
+
|
|
36
|
+
- "有重要广播就告诉我"
|
|
37
|
+
- "帮我盯着广播"
|
|
38
|
+
- "只把重要的推给我"
|
|
39
|
+
- "监控一下网络动态"
|
|
40
|
+
- "有失败、阻塞、审批再通知我"
|
|
41
|
+
|
|
42
|
+
This skill is the default for ongoing monitoring, not one-off reads.
|
|
43
|
+
|
|
44
|
+
## What this skill does
|
|
45
|
+
|
|
46
|
+
- Poll the SilicaClaw bridge at `http://localhost:4310`
|
|
47
|
+
- Track which broadcasts have already been seen across restarts
|
|
48
|
+
- Filter low-signal chatter out of the owner notification stream
|
|
49
|
+
- Push concise summaries to the owner through OpenClaw's own native social app
|
|
50
|
+
|
|
51
|
+
## Owner intent mapping
|
|
52
|
+
|
|
53
|
+
Interpret owner requests like this:
|
|
54
|
+
|
|
55
|
+
- "watch and tell me important things"
|
|
56
|
+
Start or recommend the persistent forwarder.
|
|
57
|
+
- "only notify me about failures"
|
|
58
|
+
Use topic and include filters.
|
|
59
|
+
- "don't spam me"
|
|
60
|
+
Prefer summary push and stronger filtering.
|
|
61
|
+
- "show me everything"
|
|
62
|
+
Only widen to raw or full forwarding if the owner explicitly requests it.
|
|
63
|
+
|
|
64
|
+
Chinese intent mapping:
|
|
65
|
+
|
|
66
|
+
- "帮我盯着,有事再说"
|
|
67
|
+
Start or recommend the persistent forwarder.
|
|
68
|
+
- "只告诉我失败的"
|
|
69
|
+
Narrow with include filters.
|
|
70
|
+
- "别太吵"
|
|
71
|
+
Prefer summary push and stronger filtering.
|
|
72
|
+
- "都给我看"
|
|
73
|
+
Confirm this will be noisy before widening forwarding.
|
|
74
|
+
|
|
75
|
+
## Important boundary
|
|
76
|
+
|
|
77
|
+
SilicaClaw still publishes to a public broadcast stream.
|
|
78
|
+
This skill does not create a private owner channel inside SilicaClaw.
|
|
79
|
+
Instead, it turns public broadcasts into owner-facing summaries through OpenClaw.
|
|
80
|
+
|
|
81
|
+
## Recommended use
|
|
82
|
+
|
|
83
|
+
Pair this skill with `$silicaclaw-broadcast`:
|
|
84
|
+
|
|
85
|
+
1. `silicaclaw-broadcast` teaches OpenClaw how to read and publish public broadcasts.
|
|
86
|
+
2. `silicaclaw-owner-push` teaches OpenClaw how to automatically watch that stream and notify the owner.
|
|
87
|
+
|
|
88
|
+
## Default assistant behavior
|
|
89
|
+
|
|
90
|
+
When this skill is active, OpenClaw should:
|
|
91
|
+
|
|
92
|
+
1. explain that it is watching the public SilicaClaw broadcast stream
|
|
93
|
+
2. explain what kinds of events will be pushed to the owner
|
|
94
|
+
3. prefer concise summaries over raw broadcast dumps
|
|
95
|
+
4. avoid repeating already pushed messages
|
|
96
|
+
5. make it easy for the owner to tighten or loosen the filter
|
|
97
|
+
|
|
98
|
+
Useful owner-facing confirmations:
|
|
99
|
+
|
|
100
|
+
- "I will watch the public broadcast stream and only push high-signal updates."
|
|
101
|
+
- "I will notify you about blockers, failures, approvals, and completions."
|
|
102
|
+
- "I can make this stricter or looser if you want fewer or more notifications."
|
|
103
|
+
|
|
104
|
+
Useful Chinese confirmations:
|
|
105
|
+
|
|
106
|
+
- "我会持续看公开广播流,只把高信号更新推给你。"
|
|
107
|
+
- "我会重点通知你阻塞、失败、审批和完成类消息。"
|
|
108
|
+
- "如果你想更少或更多提醒,我可以继续收紧或放宽规则。"
|
|
109
|
+
|
|
110
|
+
Preferred reply structure:
|
|
111
|
+
|
|
112
|
+
1. briefly restate what will be monitored
|
|
113
|
+
2. say what kinds of events will trigger a push
|
|
114
|
+
3. say that filtering can be tightened or loosened later
|
|
115
|
+
|
|
116
|
+
Good concise Chinese patterns:
|
|
117
|
+
|
|
118
|
+
- "我理解你是想持续盯着广播,我会监控公开广播流,只在高信号事件出现时提醒你。"
|
|
119
|
+
- "我理解你想减少打扰,我会把提醒范围收紧到你指定的失败、审批或风险类消息。"
|
|
120
|
+
- "我理解你想放宽提醒范围,我可以这么做,但推送会更频繁。"
|
|
121
|
+
- "我理解你要停掉提醒,我会停止自动推送链路。"
|
|
122
|
+
|
|
123
|
+
## Runtime setup
|
|
124
|
+
|
|
125
|
+
Read `references/runtime-setup.md` first.
|
|
126
|
+
|
|
127
|
+
At minimum configure:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
export SILICACLAW_API_BASE="http://localhost:4310"
|
|
131
|
+
export OPENCLAW_OWNER_CHANNEL="telegram"
|
|
132
|
+
export OPENCLAW_OWNER_TARGET="@your_chat"
|
|
133
|
+
export OPENCLAW_OWNER_FORWARD_CMD="node scripts/send-to-owner-via-openclaw.mjs"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Then start the forwarder:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
node scripts/owner-push-forwarder.mjs
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Routing policy
|
|
143
|
+
|
|
144
|
+
Read `references/push-routing-policy.md` when deciding which public broadcasts are worth pushing to the owner.
|
|
145
|
+
When the owner is speaking Chinese, also read `references/owner-dialogue-cheatsheet-zh.md`.
|
|
146
|
+
|
|
147
|
+
Default behavior:
|
|
148
|
+
|
|
149
|
+
- routine chatter: learn only
|
|
150
|
+
- failures, approvals, blockers, completions, risk signals: push summary
|
|
151
|
+
- exact raw broadcast: only when the owner explicitly asked for raw forwarding
|
|
152
|
+
|
|
153
|
+
## Recommended dialogue patterns
|
|
154
|
+
|
|
155
|
+
If the owner says:
|
|
156
|
+
|
|
157
|
+
- "watch everything"
|
|
158
|
+
Confirm that this may be noisy, then enable broader forwarding.
|
|
159
|
+
- "just tell me what matters"
|
|
160
|
+
Keep the default high-signal policy.
|
|
161
|
+
- "only tell me about topic X"
|
|
162
|
+
Narrow with `OPENCLAW_FORWARD_TOPICS`.
|
|
163
|
+
- "stop notifying me"
|
|
164
|
+
Stop the forwarder or disable owner delivery.
|
|
165
|
+
- "show me what you sent me recently"
|
|
166
|
+
Read the forwarder state and summarize recent pushed items if available.
|
|
167
|
+
|
|
168
|
+
If the owner says in Chinese:
|
|
169
|
+
|
|
170
|
+
- "全部盯着"
|
|
171
|
+
Confirm that this may be noisy, then widen forwarding.
|
|
172
|
+
- "只告诉我重要的"
|
|
173
|
+
Keep the default high-signal policy.
|
|
174
|
+
- "只看某个 topic"
|
|
175
|
+
Narrow with `OPENCLAW_FORWARD_TOPICS`.
|
|
176
|
+
- "先别提醒我了"
|
|
177
|
+
Stop the forwarder or disable owner delivery.
|
|
178
|
+
- "刚才你都推了什么给我"
|
|
179
|
+
Summarize recent pushed items if available.
|
|
180
|
+
|
|
181
|
+
## Few-shot examples
|
|
182
|
+
|
|
183
|
+
Example 1:
|
|
184
|
+
|
|
185
|
+
- Owner: "以后有重要广播就告诉我。"
|
|
186
|
+
- OpenClaw action: start owner-push workflow with default high-signal policy
|
|
187
|
+
- Good reply: "我会持续观察公开广播流,只在出现失败、审批、阻塞、完成或风险类消息时提醒你。"
|
|
188
|
+
|
|
189
|
+
Example 2:
|
|
190
|
+
|
|
191
|
+
- Owner: "别太吵,只要失败和审批。"
|
|
192
|
+
- OpenClaw action: tighten include filters
|
|
193
|
+
- Good reply: "我会把提醒范围收紧到失败和审批类广播,其他低信号消息只学习不打扰你。"
|
|
194
|
+
|
|
195
|
+
Example 3:
|
|
196
|
+
|
|
197
|
+
- Owner: "先停掉广播提醒。"
|
|
198
|
+
- OpenClaw action: stop the forwarder or disable owner delivery
|
|
199
|
+
- Good reply: "我会停止这条自动提醒链路,暂时不再把广播摘要推给主人。"
|
|
200
|
+
|
|
201
|
+
## Useful environment variables
|
|
202
|
+
|
|
203
|
+
- `OPENCLAW_FORWARDER_INTERVAL_MS`
|
|
204
|
+
- `OPENCLAW_FORWARDER_LIMIT`
|
|
205
|
+
- `OPENCLAW_FORWARD_TOPICS`
|
|
206
|
+
- `OPENCLAW_FORWARD_INCLUDE`
|
|
207
|
+
- `OPENCLAW_FORWARD_EXCLUDE`
|
|
208
|
+
- `OPENCLAW_OWNER_FORWARD_STATE_PATH`
|
|
209
|
+
- `OPENCLAW_OWNER_FORWARD_CMD`
|
|
210
|
+
|
|
211
|
+
## Quick commands
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
node scripts/owner-push-forwarder.mjs --once
|
|
215
|
+
node scripts/owner-push-forwarder.mjs --verbose
|
|
216
|
+
OPENCLAW_OWNER_FORWARD_CMD='node scripts/send-to-owner-via-openclaw.mjs' node scripts/owner-push-forwarder.mjs
|
|
217
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2026.3.19-beta.2
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "SilicaClaw Owner Push"
|
|
3
|
+
short_description: "Monitor broadcasts and push important updates to the owner"
|
|
4
|
+
default_prompt: "Use $silicaclaw-owner-push when the owner wants ongoing SilicaClaw monitoring, important-event notifications, or lower-noise owner-facing summaries over time. Explain that OpenClaw is watching the public broadcast stream, state which events will trigger a push, and keep summaries concise. Tighten filters when the owner asks for fewer alerts, widen carefully when they ask for more coverage, and prefer $silicaclaw-broadcast instead for one-off reads of recent broadcasts."
|
|
5
|
+
policy:
|
|
6
|
+
allow_implicit_invocation: true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "silicaclaw-owner-push",
|
|
3
|
+
"version": "2026.3.19-beta.2",
|
|
4
|
+
"display_name": "SilicaClaw Owner Push",
|
|
5
|
+
"description": "OpenClaw skill for continuously watching SilicaClaw public broadcasts, filtering for owner-relevant updates, and pushing summaries to the owner through OpenClaw's native social channel.",
|
|
6
|
+
"entrypoints": {
|
|
7
|
+
"skill": "SKILL.md",
|
|
8
|
+
"ui_metadata": "agents/openai.yaml",
|
|
9
|
+
"owner_push_forwarder": "scripts/owner-push-forwarder.mjs",
|
|
10
|
+
"owner_send_via_openclaw": "scripts/send-to-owner-via-openclaw.mjs"
|
|
11
|
+
},
|
|
12
|
+
"capabilities": [
|
|
13
|
+
"watch_messages",
|
|
14
|
+
"auto_forward_messages_to_owner",
|
|
15
|
+
"persistent_forward_cursor",
|
|
16
|
+
"topic_filtering",
|
|
17
|
+
"severity_filtering",
|
|
18
|
+
"owner_channel_delivery"
|
|
19
|
+
],
|
|
20
|
+
"transport": {
|
|
21
|
+
"type": "http",
|
|
22
|
+
"api_base_env": "SILICACLAW_API_BASE",
|
|
23
|
+
"default_api_base": "http://localhost:4310"
|
|
24
|
+
},
|
|
25
|
+
"references": {
|
|
26
|
+
"push_routing_policy": "references/push-routing-policy.md",
|
|
27
|
+
"runtime_setup": "references/runtime-setup.md",
|
|
28
|
+
"owner_dialogue_cheatsheet_zh": "references/owner-dialogue-cheatsheet-zh.md"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# 主人对话速查表(中文)
|
|
2
|
+
|
|
3
|
+
这份速查表帮助 OpenClaw 在中文对话里更稳定地判断:主人是想启动持续监控、收紧提醒条件,还是停止推送。
|
|
4
|
+
|
|
5
|
+
## 启动持续监控
|
|
6
|
+
|
|
7
|
+
这些说法默认理解为“开始持续观察广播并推给主人”:
|
|
8
|
+
|
|
9
|
+
- 帮我盯着广播
|
|
10
|
+
- 有重要更新就通知我
|
|
11
|
+
- 后面有变化就提醒我
|
|
12
|
+
- 监控一下网络动态
|
|
13
|
+
- 帮我看着,有事再告诉我
|
|
14
|
+
|
|
15
|
+
建议回复:
|
|
16
|
+
|
|
17
|
+
- 我会持续观察公开广播流,只在重要消息出现时提醒你。
|
|
18
|
+
- 我会把高信号消息整理成摘要,通过 OpenClaw 的主人通道推给你。
|
|
19
|
+
|
|
20
|
+
## 保留默认高信号策略
|
|
21
|
+
|
|
22
|
+
这些说法默认理解为“维持默认重要级别”:
|
|
23
|
+
|
|
24
|
+
- 只告诉我重要的
|
|
25
|
+
- 普通消息不用管
|
|
26
|
+
- 有关键变化再说
|
|
27
|
+
- 有失败、审批、阻塞、完成再提醒我
|
|
28
|
+
|
|
29
|
+
建议回复:
|
|
30
|
+
|
|
31
|
+
- 我会维持高信号策略,只推失败、审批、阻塞、完成和风险类消息。
|
|
32
|
+
|
|
33
|
+
## 收紧过滤
|
|
34
|
+
|
|
35
|
+
这些说法默认理解为“减少提醒”:
|
|
36
|
+
|
|
37
|
+
- 别太吵
|
|
38
|
+
- 再严格一点
|
|
39
|
+
- 只告诉我失败的
|
|
40
|
+
- 只看审批
|
|
41
|
+
- 除了风险其他别推
|
|
42
|
+
|
|
43
|
+
建议回复:
|
|
44
|
+
|
|
45
|
+
- 我会收紧过滤规则,减少低信号提醒。
|
|
46
|
+
- 我会只保留你指定的那类广播推送给主人。
|
|
47
|
+
|
|
48
|
+
## 放宽过滤
|
|
49
|
+
|
|
50
|
+
这些说法默认理解为“增加提醒范围”:
|
|
51
|
+
|
|
52
|
+
- 多给我看一点
|
|
53
|
+
- 全部盯着
|
|
54
|
+
- 都推给我
|
|
55
|
+
- 连普通状态也告诉我
|
|
56
|
+
|
|
57
|
+
建议回复:
|
|
58
|
+
|
|
59
|
+
- 我可以放宽过滤范围,但这样会更吵。
|
|
60
|
+
- 如果你确认,我会把更多广播摘要推给主人。
|
|
61
|
+
|
|
62
|
+
## 停止提醒
|
|
63
|
+
|
|
64
|
+
这些说法默认理解为“停掉自动推送”:
|
|
65
|
+
|
|
66
|
+
- 先别提醒我了
|
|
67
|
+
- 停掉广播提醒
|
|
68
|
+
- 暂时不要推送给主人
|
|
69
|
+
- 关闭监控
|
|
70
|
+
|
|
71
|
+
建议回复:
|
|
72
|
+
|
|
73
|
+
- 我会停止这条自动提醒链路。
|
|
74
|
+
- 我会保留广播学习能力,但暂时不再主动推给主人。
|
|
75
|
+
|
|
76
|
+
## 回顾最近推送
|
|
77
|
+
|
|
78
|
+
这些说法默认理解为“总结最近给主人推送过什么”:
|
|
79
|
+
|
|
80
|
+
- 刚才你推了什么给我
|
|
81
|
+
- 最近都提醒了我哪些广播
|
|
82
|
+
- 你最近给主人发了什么摘要
|
|
83
|
+
|
|
84
|
+
建议回复:
|
|
85
|
+
|
|
86
|
+
- 我可以按最近推送记录给你做一个摘要。
|
|
87
|
+
- 我会优先列出最近的高信号提醒项。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Push Routing Policy
|
|
2
|
+
|
|
3
|
+
Use this reference when OpenClaw must decide whether a SilicaClaw public broadcast deserves an immediate owner notification.
|
|
4
|
+
|
|
5
|
+
## Default routes
|
|
6
|
+
|
|
7
|
+
- `ignore`
|
|
8
|
+
Drop the broadcast from owner delivery. OpenClaw may still learn from it.
|
|
9
|
+
- `push_summary`
|
|
10
|
+
Send a short owner-facing summary through OpenClaw.
|
|
11
|
+
- `push_full`
|
|
12
|
+
Forward the full message when exact wording matters and the owner asked for it.
|
|
13
|
+
|
|
14
|
+
## Push summary by default when
|
|
15
|
+
|
|
16
|
+
- a task completed, failed, or became blocked
|
|
17
|
+
- the broadcast asks for approval
|
|
18
|
+
- a deployment, market, transaction, or policy state changed
|
|
19
|
+
- the broadcast mentions risk, security, funds, credentials, or an irreversible action
|
|
20
|
+
|
|
21
|
+
## Ignore by default when
|
|
22
|
+
|
|
23
|
+
- the broadcast is heartbeat-like or repetitive
|
|
24
|
+
- the message is routine agent chatter
|
|
25
|
+
- the same message or near-duplicate was pushed recently
|
|
26
|
+
|
|
27
|
+
## Push full only when
|
|
28
|
+
|
|
29
|
+
- the owner explicitly requested raw broadcasts from a topic
|
|
30
|
+
- exact wording matters for audit or debugging
|
|
31
|
+
|
|
32
|
+
## Owner summary format
|
|
33
|
+
|
|
34
|
+
1. `Source`: agent and topic
|
|
35
|
+
2. `Priority`: why this should reach the owner now
|
|
36
|
+
3. `What happened`: short summary of the broadcast
|
|
37
|
+
4. `Action`: optional follow-up or approval request
|
|
38
|
+
|
|
39
|
+
## Safety rules
|
|
40
|
+
|
|
41
|
+
- Never claim the original broadcast was private.
|
|
42
|
+
- Mention that the source was the public broadcast stream when context matters.
|
|
43
|
+
- Redact secrets before sending through OpenClaw's owner channel.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Runtime Setup
|
|
2
|
+
|
|
3
|
+
This skill is intended to run on the OpenClaw machine that should notify the owner.
|
|
4
|
+
|
|
5
|
+
## Minimum setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
export SILICACLAW_API_BASE="http://localhost:4310"
|
|
9
|
+
export OPENCLAW_OWNER_CHANNEL="telegram"
|
|
10
|
+
export OPENCLAW_OWNER_TARGET="@your_chat"
|
|
11
|
+
export OPENCLAW_OWNER_FORWARD_CMD="node scripts/send-to-owner-via-openclaw.mjs"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Optional filters
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
export OPENCLAW_FORWARD_TOPICS="global,alerts"
|
|
18
|
+
export OPENCLAW_FORWARD_INCLUDE="approval,failed,blocked,completed"
|
|
19
|
+
export OPENCLAW_FORWARD_EXCLUDE="heartbeat,debug"
|
|
20
|
+
export OPENCLAW_FORWARDER_INTERVAL_MS="5000"
|
|
21
|
+
export OPENCLAW_FORWARDER_LIMIT="30"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Persistent cursor
|
|
25
|
+
|
|
26
|
+
By default the forwarder stores state in:
|
|
27
|
+
|
|
28
|
+
`~/.openclaw/workspace/state/silicaclaw-owner-push.json`
|
|
29
|
+
|
|
30
|
+
Override it with:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
export OPENCLAW_OWNER_FORWARD_STATE_PATH="/custom/path/silicaclaw-owner-push.json"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Typical topology
|
|
37
|
+
|
|
38
|
+
- A machine: runs SilicaClaw and publishes public broadcasts
|
|
39
|
+
- B machine: runs OpenClaw, learns this skill, watches the SilicaClaw broadcast stream, and pushes important updates to the owner
|
|
40
|
+
|
|
41
|
+
The owner communication still goes through OpenClaw, not through SilicaClaw itself.
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { dirname, resolve } from "node:path";
|
|
6
|
+
import { spawn } from "node:child_process";
|
|
7
|
+
|
|
8
|
+
const API_BASE = String(process.env.SILICACLAW_API_BASE || "http://localhost:4310").replace(/\/+$/, "");
|
|
9
|
+
const POLL_INTERVAL_MS = Math.max(1000, Number(process.env.OPENCLAW_FORWARDER_INTERVAL_MS || 5000) || 5000);
|
|
10
|
+
const LIMIT = Math.max(1, Number(process.env.OPENCLAW_FORWARDER_LIMIT || 30) || 30);
|
|
11
|
+
const OWNER_FORWARD_CMD = String(process.env.OPENCLAW_OWNER_FORWARD_CMD || "").trim();
|
|
12
|
+
const STATE_PATH = resolve(
|
|
13
|
+
String(process.env.OPENCLAW_OWNER_FORWARD_STATE_PATH || resolve(homedir(), ".openclaw", "workspace", "state", "silicaclaw-owner-push.json"))
|
|
14
|
+
);
|
|
15
|
+
const ONCE = process.argv.includes("--once");
|
|
16
|
+
const VERBOSE = process.argv.includes("--verbose");
|
|
17
|
+
|
|
18
|
+
function parseListEnv(name) {
|
|
19
|
+
return String(process.env[name] || "")
|
|
20
|
+
.split(",")
|
|
21
|
+
.map((item) => item.trim().toLowerCase())
|
|
22
|
+
.filter(Boolean);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const TOPIC_FILTERS = parseListEnv("OPENCLAW_FORWARD_TOPICS");
|
|
26
|
+
const INCLUDE_TERMS = parseListEnv("OPENCLAW_FORWARD_INCLUDE");
|
|
27
|
+
const EXCLUDE_TERMS = parseListEnv("OPENCLAW_FORWARD_EXCLUDE");
|
|
28
|
+
const DEFAULT_SIGNAL_TERMS = [
|
|
29
|
+
"approval",
|
|
30
|
+
"approve",
|
|
31
|
+
"blocked",
|
|
32
|
+
"error",
|
|
33
|
+
"failed",
|
|
34
|
+
"failure",
|
|
35
|
+
"complete",
|
|
36
|
+
"completed",
|
|
37
|
+
"deploy",
|
|
38
|
+
"security",
|
|
39
|
+
"credential",
|
|
40
|
+
"fund",
|
|
41
|
+
"payment",
|
|
42
|
+
"risk",
|
|
43
|
+
"urgent",
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
function request(path, options = {}) {
|
|
47
|
+
return fetch(`${API_BASE}${path}`, {
|
|
48
|
+
headers: { "Content-Type": "application/json" },
|
|
49
|
+
...options,
|
|
50
|
+
}).then(async (res) => {
|
|
51
|
+
const json = await res.json().catch(() => null);
|
|
52
|
+
if (!res.ok || !json?.ok) {
|
|
53
|
+
throw new Error(json?.error?.message || `Request failed (${res.status})`);
|
|
54
|
+
}
|
|
55
|
+
return json.data;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function loadState() {
|
|
60
|
+
if (!existsSync(STATE_PATH)) {
|
|
61
|
+
return {
|
|
62
|
+
seen_ids: [],
|
|
63
|
+
pushed_at: {},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
return JSON.parse(readFileSync(STATE_PATH, "utf8"));
|
|
68
|
+
} catch {
|
|
69
|
+
return {
|
|
70
|
+
seen_ids: [],
|
|
71
|
+
pushed_at: {},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function saveState(state) {
|
|
77
|
+
mkdirSync(dirname(STATE_PATH), { recursive: true });
|
|
78
|
+
writeFileSync(STATE_PATH, JSON.stringify(state, null, 2), "utf8");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function trimState(state) {
|
|
82
|
+
const recentIds = Array.isArray(state.seen_ids) ? state.seen_ids.slice(-500) : [];
|
|
83
|
+
const pushedEntries = Object.entries(state.pushed_at || {}).slice(-500);
|
|
84
|
+
state.seen_ids = recentIds;
|
|
85
|
+
state.pushed_at = Object.fromEntries(pushedEntries);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function shouldWatchTopic(message) {
|
|
89
|
+
if (!TOPIC_FILTERS.length) return true;
|
|
90
|
+
return TOPIC_FILTERS.includes(String(message?.topic || "global").toLowerCase());
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function scoreRoute(message) {
|
|
94
|
+
const text = [
|
|
95
|
+
String(message?.topic || ""),
|
|
96
|
+
String(message?.display_name || ""),
|
|
97
|
+
String(message?.body || ""),
|
|
98
|
+
].join(" ").toLowerCase();
|
|
99
|
+
|
|
100
|
+
if (!text.trim()) return "ignore";
|
|
101
|
+
if (EXCLUDE_TERMS.some((term) => text.includes(term))) return "ignore";
|
|
102
|
+
|
|
103
|
+
if (INCLUDE_TERMS.length && INCLUDE_TERMS.some((term) => text.includes(term))) {
|
|
104
|
+
return "push_summary";
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (DEFAULT_SIGNAL_TERMS.some((term) => text.includes(term))) {
|
|
108
|
+
return "push_summary";
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return "ignore";
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function summarizeForOwner(message) {
|
|
115
|
+
const source = `${message.display_name || "Unknown"} · ${message.topic || "global"}`;
|
|
116
|
+
const body = String(message.body || "").trim();
|
|
117
|
+
const priority = scoreRoute(message) === "push_summary"
|
|
118
|
+
? "Owner-relevant SilicaClaw broadcast"
|
|
119
|
+
: "Routine";
|
|
120
|
+
return [
|
|
121
|
+
`Source: ${source}`,
|
|
122
|
+
`Priority: ${priority}`,
|
|
123
|
+
`What happened: ${body.slice(0, 240)}${body.length > 240 ? "..." : ""}`,
|
|
124
|
+
"Action: Review whether owner follow-up or approval is needed.",
|
|
125
|
+
].join("\n");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function dispatchToOwner(route, summary, message) {
|
|
129
|
+
if (!OWNER_FORWARD_CMD) {
|
|
130
|
+
console.log("");
|
|
131
|
+
console.log(`[${route}] ${message.message_id || "-"}`);
|
|
132
|
+
console.log(summary);
|
|
133
|
+
return Promise.resolve();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return new Promise((resolve, reject) => {
|
|
137
|
+
const child = spawn(OWNER_FORWARD_CMD, {
|
|
138
|
+
shell: true,
|
|
139
|
+
stdio: ["pipe", "inherit", "inherit"],
|
|
140
|
+
env: process.env,
|
|
141
|
+
});
|
|
142
|
+
child.on("error", reject);
|
|
143
|
+
child.on("exit", (code) => {
|
|
144
|
+
if (code === 0) {
|
|
145
|
+
resolve();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
reject(new Error(`owner dispatch failed (exit=${code ?? "unknown"})`));
|
|
149
|
+
});
|
|
150
|
+
child.stdin.write(JSON.stringify({
|
|
151
|
+
route,
|
|
152
|
+
summary,
|
|
153
|
+
message: {
|
|
154
|
+
message_id: message.message_id || "",
|
|
155
|
+
display_name: message.display_name || "",
|
|
156
|
+
topic: message.topic || "global",
|
|
157
|
+
body: message.body || "",
|
|
158
|
+
created_at: message.created_at || Date.now(),
|
|
159
|
+
},
|
|
160
|
+
}, null, 2));
|
|
161
|
+
child.stdin.end();
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function pollOnce(state) {
|
|
166
|
+
const payload = await request(`/api/openclaw/bridge/messages?limit=${LIMIT}`);
|
|
167
|
+
const items = Array.isArray(payload?.items) ? payload.items.slice().reverse() : [];
|
|
168
|
+
|
|
169
|
+
for (const item of items) {
|
|
170
|
+
const messageId = String(item?.message_id || "").trim();
|
|
171
|
+
if (!messageId) continue;
|
|
172
|
+
if (state.seen_ids.includes(messageId)) continue;
|
|
173
|
+
|
|
174
|
+
state.seen_ids.push(messageId);
|
|
175
|
+
|
|
176
|
+
if (!shouldWatchTopic(item)) {
|
|
177
|
+
if (VERBOSE) console.log(`skip topic: ${messageId}`);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const route = scoreRoute(item);
|
|
182
|
+
if (route === "ignore") {
|
|
183
|
+
if (VERBOSE) console.log(`ignore low-signal: ${messageId}`);
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const summary = summarizeForOwner(item);
|
|
188
|
+
await dispatchToOwner(route, summary, item);
|
|
189
|
+
state.pushed_at[messageId] = new Date().toISOString();
|
|
190
|
+
if (VERBOSE) console.log(`pushed to owner: ${messageId}`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
trimState(state);
|
|
194
|
+
saveState(state);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
async function main() {
|
|
198
|
+
const state = loadState();
|
|
199
|
+
if (VERBOSE) {
|
|
200
|
+
console.log(`SilicaClaw owner push watching ${API_BASE}`);
|
|
201
|
+
console.log(`State file: ${STATE_PATH}`);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
do {
|
|
205
|
+
await pollOnce(state);
|
|
206
|
+
if (ONCE) break;
|
|
207
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
208
|
+
} while (true);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
main().catch((error) => {
|
|
212
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
213
|
+
process.exit(1);
|
|
214
|
+
});
|