@silicaclaw/cli 2026.3.19-9 → 2026.3.20-1
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 +128 -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 +15 -1
- 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 +109 -47
- package/scripts/silicaclaw-gateway.mjs +302 -84
- package/scripts/validate-openclaw-skill.mjs +79 -21
|
@@ -9,6 +9,7 @@ import { fileURLToPath } from "node:url";
|
|
|
9
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
10
|
const __dirname = dirname(__filename);
|
|
11
11
|
const ROOT_DIR = resolve(__dirname, "..");
|
|
12
|
+
const INVOCATION_CWD = process.cwd();
|
|
12
13
|
|
|
13
14
|
const COLOR = {
|
|
14
15
|
reset: "\x1b[0m",
|
|
@@ -34,7 +35,7 @@ function displayVersion(raw) {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
function headline() {
|
|
37
|
-
console.log(`${paint("SilicaClaw", COLOR.bold, COLOR.orange)} ${paint(displayVersion(readVersion()), COLOR.dim)}`);
|
|
38
|
+
console.log(`${paint("🦀 SilicaClaw", COLOR.bold, COLOR.orange)} ${paint(displayVersion(readVersion()), COLOR.dim)}`);
|
|
38
39
|
console.log(paint("Public identity and discovery for OpenClaw agents.", COLOR.dim));
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -50,7 +51,10 @@ function run(cmd, args, extra = {}) {
|
|
|
50
51
|
const result = spawnSync(cmd, args, {
|
|
51
52
|
cwd: ROOT_DIR,
|
|
52
53
|
stdio: "inherit",
|
|
53
|
-
env:
|
|
54
|
+
env: {
|
|
55
|
+
...process.env,
|
|
56
|
+
SILICACLAW_WORKSPACE_DIR: process.env.SILICACLAW_WORKSPACE_DIR || INVOCATION_CWD,
|
|
57
|
+
},
|
|
54
58
|
...extra,
|
|
55
59
|
});
|
|
56
60
|
if (result.error) {
|
|
@@ -68,7 +72,10 @@ function runCapture(cmd, args, extra = {}) {
|
|
|
68
72
|
cwd: ROOT_DIR,
|
|
69
73
|
stdio: ["ignore", "pipe", "pipe"],
|
|
70
74
|
encoding: "utf8",
|
|
71
|
-
env:
|
|
75
|
+
env: {
|
|
76
|
+
...process.env,
|
|
77
|
+
SILICACLAW_WORKSPACE_DIR: process.env.SILICACLAW_WORKSPACE_DIR || INVOCATION_CWD,
|
|
78
|
+
},
|
|
72
79
|
...extra,
|
|
73
80
|
});
|
|
74
81
|
if (result.error) {
|
|
@@ -81,7 +88,10 @@ function runInherit(cmd, args, extra = {}) {
|
|
|
81
88
|
const result = spawnSync(cmd, args, {
|
|
82
89
|
cwd: ROOT_DIR,
|
|
83
90
|
stdio: "inherit",
|
|
84
|
-
env:
|
|
91
|
+
env: {
|
|
92
|
+
...process.env,
|
|
93
|
+
SILICACLAW_WORKSPACE_DIR: process.env.SILICACLAW_WORKSPACE_DIR || INVOCATION_CWD,
|
|
94
|
+
},
|
|
85
95
|
...extra,
|
|
86
96
|
});
|
|
87
97
|
if (result.error) {
|
|
@@ -138,6 +148,25 @@ function userNpmCacheDir() {
|
|
|
138
148
|
return resolve(homedir(), ".silicaclaw", "npm-cache");
|
|
139
149
|
}
|
|
140
150
|
|
|
151
|
+
function shimScriptText(specifier = "latest") {
|
|
152
|
+
return [
|
|
153
|
+
"#!/usr/bin/env bash",
|
|
154
|
+
"set -euo pipefail",
|
|
155
|
+
'export npm_config_cache="${npm_config_cache:-$HOME/.silicaclaw/npm-cache}"',
|
|
156
|
+
`exec npx -y @silicaclaw/cli@${specifier} "$@"`,
|
|
157
|
+
"",
|
|
158
|
+
].join("\n");
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function ensureUserShim(specifier = "latest") {
|
|
162
|
+
const shimPath = userShimPath();
|
|
163
|
+
const binDir = userShimDir();
|
|
164
|
+
const npmCacheDir = userNpmCacheDir();
|
|
165
|
+
mkdirSync(binDir, { recursive: true });
|
|
166
|
+
mkdirSync(npmCacheDir, { recursive: true });
|
|
167
|
+
writeFileSync(shimPath, shimScriptText(specifier), { encoding: "utf8", mode: 0o755 });
|
|
168
|
+
}
|
|
169
|
+
|
|
141
170
|
function ensureLineInFile(filePath, block) {
|
|
142
171
|
try {
|
|
143
172
|
const current = existsSync(filePath) ? readFileSync(filePath, "utf8") : "";
|
|
@@ -202,7 +231,7 @@ function shellInitTargets() {
|
|
|
202
231
|
return targets;
|
|
203
232
|
}
|
|
204
233
|
|
|
205
|
-
function installPersistentCommand() {
|
|
234
|
+
function installPersistentCommand(specifier = readPackageVersion()) {
|
|
206
235
|
const binDir = userShimDir();
|
|
207
236
|
const shimPath = userShimPath();
|
|
208
237
|
const envFile = userEnvFile();
|
|
@@ -222,17 +251,7 @@ function installPersistentCommand() {
|
|
|
222
251
|
mkdirSync(binDir, { recursive: true });
|
|
223
252
|
mkdirSync(npmCacheDir, { recursive: true });
|
|
224
253
|
writeFileSync(envFile, envBlock, { encoding: "utf8", mode: 0o755 });
|
|
225
|
-
writeFileSync(
|
|
226
|
-
shimPath,
|
|
227
|
-
[
|
|
228
|
-
"#!/usr/bin/env bash",
|
|
229
|
-
"set -euo pipefail",
|
|
230
|
-
'export npm_config_cache="${npm_config_cache:-$HOME/.silicaclaw/npm-cache}"',
|
|
231
|
-
'exec npx -y @silicaclaw/cli@beta "$@"',
|
|
232
|
-
"",
|
|
233
|
-
].join("\n"),
|
|
234
|
-
{ encoding: "utf8", mode: 0o755 }
|
|
235
|
-
);
|
|
254
|
+
writeFileSync(shimPath, shimScriptText(specifier || "latest"), { encoding: "utf8", mode: 0o755 });
|
|
236
255
|
const rcFiles = shellInitTargets();
|
|
237
256
|
const updatedFiles = [];
|
|
238
257
|
const configuredFiles = [];
|
|
@@ -296,20 +315,39 @@ function canWriteGlobalPrefix() {
|
|
|
296
315
|
}
|
|
297
316
|
}
|
|
298
317
|
|
|
299
|
-
function showUpdateGuide(current,
|
|
318
|
+
function showUpdateGuide(current, targetVersion) {
|
|
300
319
|
headline();
|
|
301
320
|
console.log("");
|
|
302
|
-
const upToDate = Boolean(
|
|
321
|
+
const upToDate = Boolean(targetVersion) && current === targetVersion;
|
|
303
322
|
if (upToDate) {
|
|
304
323
|
kv("Status", `up to date (${current})`);
|
|
305
324
|
} else {
|
|
306
|
-
kv("Status", `
|
|
325
|
+
kv("Status", `update available (${targetVersion || "-"})`);
|
|
307
326
|
}
|
|
308
327
|
console.log("");
|
|
309
328
|
kv("Start", "silicaclaw start");
|
|
310
329
|
kv("Status", "silicaclaw status");
|
|
311
330
|
}
|
|
312
331
|
|
|
332
|
+
function preferredTaggedRelease(tags, current) {
|
|
333
|
+
const latest = tags.latest ? String(tags.latest) : "";
|
|
334
|
+
if (latest) return { version: latest, channel: "latest" };
|
|
335
|
+
return { version: current, channel: "unknown" };
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function preferredRegistryRelease(current) {
|
|
339
|
+
try {
|
|
340
|
+
const result = runCapture("npm", ["view", "@silicaclaw/cli", "dist-tags", "--json"]);
|
|
341
|
+
if ((result.status ?? 1) !== 0) return { version: current, channel: "current", tags: null };
|
|
342
|
+
const text = String(result.stdout || "").trim();
|
|
343
|
+
const tags = text ? JSON.parse(text) : {};
|
|
344
|
+
const preferred = preferredTaggedRelease(tags, current);
|
|
345
|
+
return { ...preferred, tags };
|
|
346
|
+
} catch {
|
|
347
|
+
return { version: current, channel: "current", tags: null };
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
313
351
|
function getGatewayStatus() {
|
|
314
352
|
try {
|
|
315
353
|
const result = runCapture("node", [resolve(ROOT_DIR, "scripts", "silicaclaw-gateway.mjs"), "status", "--json"], {
|
|
@@ -369,7 +407,8 @@ function syncCurrentPackageToAppDir(appDir) {
|
|
|
369
407
|
return true;
|
|
370
408
|
}
|
|
371
409
|
|
|
372
|
-
function restartGatewayIfRunning() {
|
|
410
|
+
function restartGatewayIfRunning(options = {}) {
|
|
411
|
+
const preferredSpecifier = String(options.preferredSpecifier || "").trim();
|
|
373
412
|
const status = getGatewayStatus();
|
|
374
413
|
const appDir = status?.app_dir ? String(status.app_dir) : "";
|
|
375
414
|
syncCurrentPackageToAppDir(appDir);
|
|
@@ -381,24 +420,37 @@ function restartGatewayIfRunning() {
|
|
|
381
420
|
}
|
|
382
421
|
|
|
383
422
|
const mode = String(status?.mode || "local");
|
|
384
|
-
const
|
|
423
|
+
const gatewayArgs = ["gateway", "restart", `--mode=${mode}`];
|
|
385
424
|
if (mode === "global-preview" && status?.signaling?.url) {
|
|
386
|
-
|
|
425
|
+
gatewayArgs.push(`--signaling-url=${status.signaling.url}`);
|
|
387
426
|
}
|
|
388
427
|
if (mode === "global-preview" && status?.signaling?.room) {
|
|
389
|
-
|
|
428
|
+
gatewayArgs.push(`--room=${status.signaling.room}`);
|
|
390
429
|
}
|
|
391
430
|
|
|
392
431
|
console.log("");
|
|
393
432
|
console.log(paint("Refreshing services", COLOR.bold));
|
|
394
|
-
|
|
433
|
+
const shimPath = userShimPath();
|
|
434
|
+
const canUseUpdatedShim =
|
|
435
|
+
preferredSpecifier &&
|
|
436
|
+
existsSync(shimPath) &&
|
|
437
|
+
resolve(shimPath) !== process.argv[1];
|
|
438
|
+
|
|
439
|
+
if (canUseUpdatedShim) {
|
|
440
|
+
runInherit(shimPath, gatewayArgs, { cwd: process.cwd() });
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
runInherit("node", [resolve(ROOT_DIR, "scripts", "silicaclaw-gateway.mjs"), ...gatewayArgs.slice(1)], {
|
|
445
|
+
cwd: process.cwd(),
|
|
446
|
+
});
|
|
395
447
|
}
|
|
396
448
|
|
|
397
|
-
function tryGlobalUpgrade(
|
|
449
|
+
function tryGlobalUpgrade(version) {
|
|
398
450
|
const writableGlobal = canWriteGlobalPrefix();
|
|
399
451
|
if (!writableGlobal) return false;
|
|
400
|
-
kv("Upgrade", `installing @silicaclaw/cli@${
|
|
401
|
-
const exactResult = runCapture("npm", ["i", "-g", `@silicaclaw/cli@${
|
|
452
|
+
kv("Upgrade", `installing @silicaclaw/cli@${version} globally`);
|
|
453
|
+
const exactResult = runCapture("npm", ["i", "-g", `@silicaclaw/cli@${version}`]);
|
|
402
454
|
if ((exactResult.status ?? 1) === 0) {
|
|
403
455
|
if (exactResult.stdout) process.stdout.write(exactResult.stdout);
|
|
404
456
|
if (exactResult.stderr) process.stderr.write(exactResult.stderr);
|
|
@@ -407,8 +459,8 @@ function tryGlobalUpgrade(beta) {
|
|
|
407
459
|
|
|
408
460
|
const detail = compactOutput(`${exactResult.stdout || ""}\n${exactResult.stderr || ""}`);
|
|
409
461
|
if (detail.includes("ETARGET") || detail.includes("No matching version found")) {
|
|
410
|
-
kv("Fallback",
|
|
411
|
-
const fallbackResult = runInherit("npm", ["i", "-g",
|
|
462
|
+
kv("Fallback", `registry metadata is still settling, retrying via exact version ${version}`);
|
|
463
|
+
const fallbackResult = runInherit("npm", ["i", "-g", `@silicaclaw/cli@${version}`]);
|
|
412
464
|
return (fallbackResult.status ?? 1) === 0;
|
|
413
465
|
}
|
|
414
466
|
|
|
@@ -422,35 +474,35 @@ function tryGlobalUpgrade(beta) {
|
|
|
422
474
|
function update() {
|
|
423
475
|
const current = readPackageVersion();
|
|
424
476
|
try {
|
|
425
|
-
const
|
|
426
|
-
if (
|
|
477
|
+
const registry = preferredRegistryRelease(current);
|
|
478
|
+
if (!registry.tags) {
|
|
427
479
|
headline();
|
|
428
480
|
console.log("");
|
|
429
481
|
console.error(paint("Update check failed", COLOR.bold, COLOR.yellow));
|
|
430
|
-
if (result.stderr) console.error(result.stderr.trim());
|
|
431
482
|
console.log("");
|
|
432
483
|
kv("Try", "npm view @silicaclaw/cli dist-tags --json");
|
|
433
|
-
process.exit(
|
|
484
|
+
process.exit(1);
|
|
434
485
|
}
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
showUpdateGuide(current, latest, beta);
|
|
440
|
-
const hasNewBeta = Boolean(beta) && beta !== current;
|
|
486
|
+
const targetVersion = registry.version;
|
|
487
|
+
ensureUserShim(targetVersion || "latest");
|
|
488
|
+
showUpdateGuide(current, targetVersion);
|
|
489
|
+
const hasNewTarget = Boolean(targetVersion) && targetVersion !== current;
|
|
441
490
|
const npxRuntime = isNpxRun();
|
|
442
491
|
|
|
443
|
-
if (
|
|
492
|
+
if (hasNewTarget) {
|
|
444
493
|
if (npxRuntime) {
|
|
445
|
-
kv("Update", `next run will use ${
|
|
446
|
-
} else if (tryGlobalUpgrade(beta)) {
|
|
447
|
-
kv("Update", `installed ${beta}`);
|
|
494
|
+
kv("Update", `next run will use ${targetVersion}`);
|
|
448
495
|
} else {
|
|
449
|
-
kv("Update", `
|
|
496
|
+
kv("Update", `command now points to ${targetVersion}`);
|
|
497
|
+
if (tryGlobalUpgrade(targetVersion)) {
|
|
498
|
+
kv("Global", `installed ${targetVersion}`);
|
|
499
|
+
} else {
|
|
500
|
+
kv("Global", `install ${targetVersion} manually if needed`);
|
|
501
|
+
}
|
|
450
502
|
}
|
|
451
503
|
}
|
|
452
504
|
|
|
453
|
-
restartGatewayIfRunning();
|
|
505
|
+
restartGatewayIfRunning({ preferredSpecifier: hasNewTarget ? targetVersion : "" });
|
|
454
506
|
process.exit(0);
|
|
455
507
|
} catch (error) {
|
|
456
508
|
headline();
|
|
@@ -494,7 +546,8 @@ function help() {
|
|
|
494
546
|
headline();
|
|
495
547
|
console.log("");
|
|
496
548
|
section("Commands");
|
|
497
|
-
kv("
|
|
549
|
+
kv("First Run", "npx -y @silicaclaw/cli@latest onboard");
|
|
550
|
+
kv("Install", "npx -y @silicaclaw/cli@latest install");
|
|
498
551
|
kv("Start", "silicaclaw start");
|
|
499
552
|
kv("Status", "silicaclaw status");
|
|
500
553
|
kv("Stop", "silicaclaw stop");
|
|
@@ -509,6 +562,12 @@ function help() {
|
|
|
509
562
|
kv("Logs", "silicaclaw logs local-console");
|
|
510
563
|
kv("Doctor", "silicaclaw doctor");
|
|
511
564
|
kv("Help", "silicaclaw help");
|
|
565
|
+
console.log("");
|
|
566
|
+
section("Meaning");
|
|
567
|
+
kv("onboard", "first-time setup wizard");
|
|
568
|
+
kv("connect", "quick network setup wizard");
|
|
569
|
+
kv("install", "install persistent silicaclaw command only");
|
|
570
|
+
kv("channel", "@latest is the default release channel");
|
|
512
571
|
}
|
|
513
572
|
|
|
514
573
|
const cmd = String(process.argv[2] || "help").trim().toLowerCase();
|
|
@@ -530,7 +589,10 @@ switch (cmd) {
|
|
|
530
589
|
update();
|
|
531
590
|
break;
|
|
532
591
|
case "install":
|
|
533
|
-
|
|
592
|
+
{
|
|
593
|
+
const preferred = preferredRegistryRelease(readPackageVersion());
|
|
594
|
+
installPersistentCommand(preferred.version || readPackageVersion());
|
|
595
|
+
}
|
|
534
596
|
break;
|
|
535
597
|
case "gateway":
|
|
536
598
|
run("node", [resolve(ROOT_DIR, "scripts", "silicaclaw-gateway.mjs"), ...process.argv.slice(3)], {
|