@ssdavidai/zoclaw 1.1.4 → 1.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssdavidai/zoclaw",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Set up OpenClaw on Zo with Tailscale access in one command",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -99,12 +99,27 @@ if ! pgrep -f openclaw-gateway > /dev/null 2>&1; then
99
99
  exit 1
100
100
  fi
101
101
 
102
+ # Read gateway port from config (default 18789)
103
+ GW_PORT=$(node -pe "JSON.parse(require('fs').readFileSync('${CONFIG}','utf8')).gateway?.port ?? 18789")
102
104
  TOKEN=$(node -pe "JSON.parse(require('fs').readFileSync('${CONFIG}','utf8')).gateway?.auth?.token ?? ''")
103
- TS_URL=$(tailscale serve status 2>/dev/null | grep -oP 'https://\S+' | head -1 || true)
105
+
106
+ # Set up tailscale serve to expose the gateway Control UI on the tailnet
107
+ echo "Configuring Tailscale Serve..."
108
+ tailscale serve --bg --https=443 "http://127.0.0.1:${GW_PORT}" 2>/dev/null && \
109
+ echo " ✓ Tailscale Serve → localhost:${GW_PORT}" || \
110
+ echo " Warning: could not configure tailscale serve"
111
+
112
+ # Get the MagicDNS name for this machine
113
+ TS_HOSTNAME=$(tailscale status --json 2>/dev/null | node -pe "
114
+ const s = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
115
+ (s.Self.DNSName || '').replace(/\\.\$/, '')
116
+ " 2>/dev/null || true)
104
117
 
105
118
  echo ""
106
119
  echo "Ready!"
107
120
  echo " TUI: openclaw tui"
108
- if [ -n "$TS_URL" ] && [ -n "$TOKEN" ]; then
109
- echo " Browser: ${TS_URL}?token=${TOKEN}"
121
+ if [ -n "$TS_HOSTNAME" ] && [ -n "$TOKEN" ]; then
122
+ echo " Browser: https://${TS_HOSTNAME}?token=${TOKEN}"
123
+ echo ""
124
+ echo " Accessible from any device on your tailnet."
110
125
  fi