diff --git a/doc/DEVELOPING.md b/doc/DEVELOPING.md index 5eec30a7..d7fd0490 100644 --- a/doc/DEVELOPING.md +++ b/doc/DEVELOPING.md @@ -284,3 +284,8 @@ pnpm smoke:openclaw-docker-ui ``` This script lives at `scripts/smoke/openclaw-docker-ui.sh` and automates clone/build/config/start for Compose-based local OpenClaw UI testing. + +Pairing behavior for this smoke script: + +- default `OPENCLAW_DISABLE_DEVICE_AUTH=1` (no Control UI pairing prompt for local smoke) +- set `OPENCLAW_DISABLE_DEVICE_AUTH=0` to require standard device pairing diff --git a/docs/guides/openclaw-docker-setup.md b/docs/guides/openclaw-docker-setup.md index 4d90991d..9a852f32 100644 --- a/docs/guides/openclaw-docker-setup.md +++ b/docs/guides/openclaw-docker-setup.md @@ -41,6 +41,7 @@ What this command does: - starts `openclaw-gateway` via Compose (with required `/tmp` tmpfs override) - waits for health and prints: - `http://127.0.0.1:18789/#token=...` +- disables Control UI device pairing by default for local smoke ergonomics Environment knobs: @@ -50,6 +51,8 @@ Environment knobs: - `OPENCLAW_GATEWAY_TOKEN` (default random) - `OPENCLAW_BUILD=0` to skip rebuild - `OPENCLAW_OPEN_BROWSER=1` to auto-open the URL on macOS +- `OPENCLAW_DISABLE_DEVICE_AUTH=1` (default) disables Control UI device pairing for local smoke +- `OPENCLAW_DISABLE_DEVICE_AUTH=0` keeps pairing enabled (then approve browser with `devices` CLI commands) ### Authenticated mode diff --git a/scripts/smoke/openclaw-docker-ui.sh b/scripts/smoke/openclaw-docker-ui.sh index 1845f176..d29c835d 100755 --- a/scripts/smoke/openclaw-docker-ui.sh +++ b/scripts/smoke/openclaw-docker-ui.sh @@ -34,6 +34,19 @@ OPENCLAW_BUILD="${OPENCLAW_BUILD:-1}" OPENCLAW_WAIT_SECONDS="${OPENCLAW_WAIT_SECONDS:-45}" OPENCLAW_OPEN_BROWSER="${OPENCLAW_OPEN_BROWSER:-0}" OPENCLAW_SECRETS_FILE="${OPENCLAW_SECRETS_FILE:-$HOME/.secrets}" +OPENCLAW_DISABLE_DEVICE_AUTH="${OPENCLAW_DISABLE_DEVICE_AUTH:-1}" + +case "$OPENCLAW_DISABLE_DEVICE_AUTH" in + 1|true|TRUE|True|yes|YES|Yes) + OPENCLAW_DISABLE_DEVICE_AUTH_JSON="true" + ;; + 0|false|FALSE|False|no|NO|No) + OPENCLAW_DISABLE_DEVICE_AUTH_JSON="false" + ;; + *) + fail "OPENCLAW_DISABLE_DEVICE_AUTH must be one of: 1,0,true,false,yes,no" + ;; +esac if [[ -z "${OPENAI_API_KEY:-}" && -f "$OPENCLAW_SECRETS_FILE" ]]; then set +u @@ -75,6 +88,7 @@ cat > "$OPENCLAW_CONFIG_DIR/openclaw.json" </dev/null 2>&1; then log "opening dashboard in browser"