Migrate to OpenClaw 2026.1.29 (keep clawdbot shim); bump 0.4.8
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
This add-on runs a Moltbot Assistant instance on Home Assistant OS (Supervisor add-on).
|
||||
|
||||
> Note: Moltbot is the new name for the upstream Clawdbot project. Internally, this add-on may still use the `clawdbot` CLI/package as a compatibility layer.
|
||||
> Note: The upstream project has gone through renames. This add-on currently installs **OpenClaw** (the successor of Clawdbot) and also provides a `clawdbot` shim for backwards compatibility.
|
||||
|
||||
## What this add-on provides
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This repository contains a Home Assistant add-on that runs a **Moltbot Assistant** instance on **HAOS**.
|
||||
|
||||
Upstream note: Moltbot is the new name for the Clawdbot project. The add-on may still install/use the `clawdbot` npm package/CLI for compatibility until the upstream transition fully settles.
|
||||
Upstream note: the project has gone through renames. This add-on currently installs **OpenClaw** and keeps a `clawdbot` shim for backwards compatibility.
|
||||
|
||||
## What you get
|
||||
- Always-on personal assistant running as a Supervisor-managed container
|
||||
|
||||
@@ -42,9 +42,12 @@ RUN set -eu; \
|
||||
libstdc++ libgcc libatomic; \
|
||||
/usr/local/bin/node -v; /usr/local/bin/npm -v
|
||||
|
||||
# Install clawdbot globally
|
||||
# Install OpenClaw globally (successor of Clawdbot)
|
||||
# We also provide a lightweight `clawdbot` shim for backwards compatibility.
|
||||
RUN npm config set fund false && npm config set audit false \
|
||||
&& npm install -g clawdbot
|
||||
&& npm install -g openclaw@2026.1.29 \
|
||||
&& printf '%s\n' '#!/usr/bin/env sh' 'exec openclaw "$@"' > /usr/local/bin/clawdbot \
|
||||
&& chmod +x /usr/local/bin/clawdbot
|
||||
|
||||
COPY run.sh /run.sh
|
||||
COPY nginx.conf.tpl /etc/nginx/nginx.conf.tpl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: Moltbot Assistant
|
||||
version: "0.4.7"
|
||||
version: "0.4.8"
|
||||
slug: moltbot_assistant
|
||||
description: Run Moltbot Assistant (Clawdbot-compatible) as a Home Assistant add-on.
|
||||
url: https://github.com/techartdev/MoltBotHomeAssistant
|
||||
|
||||
@@ -149,7 +149,9 @@ if [ -z "$GW_TOKEN" ]; then
|
||||
GW_AUTH_BLOCK="auth: { mode: \"token\" }"
|
||||
fi
|
||||
|
||||
# Write Clawdbot gateway config (JSON5) into the expected location.
|
||||
# Write gateway config (JSON5).
|
||||
# We keep legacy Clawdbot paths for compatibility, and also write OpenClaw paths.
|
||||
mkdir -p /config/.clawdbot /config/.openclaw
|
||||
cat > /config/.clawdbot/clawdbot.json <<EOF
|
||||
{
|
||||
discovery: { wideArea: { enabled: false } },
|
||||
@@ -184,6 +186,9 @@ cat > /config/.clawdbot/clawdbot.json <<EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
# Also write OpenClaw config path(s) (best-effort; OpenClaw can auto-migrate legacy paths).
|
||||
cp -f /config/.clawdbot/clawdbot.json /config/.openclaw/openclaw.json 2>/dev/null || true
|
||||
|
||||
echo "Model primary=${MODEL_PRIMARY}"
|
||||
echo "Gateway bind=${GW_BIND} port=${GW_PORT} token=${GW_TOKEN:+(set)}${GW_TOKEN:-(auto)}"
|
||||
echo "Telegram dmPolicy=${DM_POLICY}${ALLOW_FROM_RAW:+ (allowFrom=${ALLOW_FROM_RAW})}"
|
||||
@@ -229,7 +234,7 @@ RUN_DOCTOR=$(jq -r '.run_doctor_on_start // false' "$OPTIONS_FILE")
|
||||
|
||||
if [ "$RUN_DOCTOR" = "true" ]; then
|
||||
echo "Running assistant doctor (auto-fix) ..."
|
||||
(timeout 60s clawdbot doctor --fix --yes) || true
|
||||
(timeout 60s "${CLI_BIN:-clawdbot}" doctor --fix --yes) || true
|
||||
else
|
||||
echo "Skipping clawdbot doctor on startup (run_doctor_on_start=false)"
|
||||
fi
|
||||
@@ -267,8 +272,18 @@ trap shutdown INT TERM
|
||||
NGINX_PID=""
|
||||
TTYD_PID=""
|
||||
|
||||
echo "Starting Moltbot Assistant gateway (clawdbot-compatible)..."
|
||||
clawdbot gateway run &
|
||||
CLI_BIN=""
|
||||
if command -v openclaw >/dev/null 2>&1; then
|
||||
CLI_BIN="openclaw"
|
||||
elif command -v clawdbot >/dev/null 2>&1; then
|
||||
CLI_BIN="clawdbot"
|
||||
else
|
||||
echo "ERROR: Neither openclaw nor clawdbot is installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starting Moltbot Assistant gateway (${CLI_BIN}-compatible)..."
|
||||
"${CLI_BIN}" gateway run &
|
||||
GW_PID=$!
|
||||
|
||||
# Start web terminal (optional)
|
||||
|
||||
Reference in New Issue
Block a user