Re-vendor wacli to upstream openclaw/wacli v0.11.0#6
Merged
Conversation
- Search: replace removed raw-IMAP `-- "..."` with positional query DSL - message move/copy: TARGET folder first, then ID (-f is source) - Sending: drop interactive editor traps; use non-interactive template pipe and raw `message send` - Cover read preview (-p), flags, delete, spam-via-move, reply-all (-A) - Note shared SMTP/IMAP app-password env var Closes #2
Vendored tools/wacli was a pre-0.5 snapshot (0.5.0-Unreleased, module github.com/steipete/wacli, whatsmeow pinned Feb 2026). Upstream moved to github.com/openclaw/wacli and is now v0.11.x. Drop the vendored tree in favor of a pinned upstream binary.
Replace the pnpm-built vendored binary with 'go install
github.com/openclaw/wacli/cmd/wacli@${WACLI_VERSION}' (pinned v0.11.0,
CGO + sqlite_fts5). Drop nodejs/npm/corepack/pnpm — only the vendored
wacli build needed them. Set WACLI_DEVICE_LABEL=MPA via ENV so the linked
device identity is native config, not a source patch.
- Set WACLI_DEVICE_LABEL=MPA via env (replaces the vendored main.go patch). - Add --lock-wait 30s to every call so reads/auth wait for the store lock instead of failing fast against a long-lived sync. - Add --read-only to pure reads (auth status, messages list) to skip the session-store lock entirely. - Drop the tools/wacli/dist fallback path; resolve via WACLI_BIN, PATH, or ~/go/bin (go install target).
Replace the pnpm vendored build with 'go install github.com/openclaw/wacli/cmd/wacli@$(WACLI_VERSION)'. Pin matches the Dockerfile. dev target no longer gates the wacli step on tools/wacli.
Add global-flags and newer-commands sections (--read-only, --lock-wait, --account, --events; messages forward/revoke, send status, calls list) and correct the lock note (wait/skip instead of fail-fast). Update the binary-not-found hint to point at 'make dev-wa' / WACLI_BIN.
- channels.mdx: correct upstream link (openclaw/wacli), explain the pinned WACLI_VERSION / WACLI_BIN / WACLI_DEVICE_LABEL model, and add an 'Upgrading wacli' section covering the 405-driven re-auth. - Drop stale tools/wacli ignore entries from .gitignore and .dockerignore.
Drop the vendored tools/wacli/dist lookup; fall back to ~/go/bin (go install target) after WACLI_BIN and PATH. Inject WACLI_DEVICE_LABEL=MPA for agent-run wacli commands when not already set, so the linked device identity holds in local dev too (Docker sets it via ENV).
README and pa.md pointed at the removed tools/wacli/ tree. Point at the upstream repo and the pinned-install model instead.
Email config is materialized from the config store (Admin UI) to a runtime Himalaya config; the executor always points HIMALAYA_CONFIG/XDG_CONFIG_HOME at it, so the docker-compose-mounted cli-configs/himalaya.toml was never read. - Drop the compose mount and Dockerfile config dir - Delete cli-configs/ (himalaya.toml.example) and its .gitignore rules - Remove now-unused HIMALAYA_*_PASSWORD env vars from .env.example - Drop stale references from README and deployment docs
wacli >=0.8 no longer prints the QR as JSON on stdout; it streams an
NDJSON `qr_code` event on stderr under --events (default qr-format writes
a terminal QR to stderr). The wrapper still parsed the old stdout shape,
so latest_qr was never set, the auth process idle-exited, and the UI fell
back to the misleading 'Auth not started' message.
- start_auth: spawn with --events, parse stderr; envelope is
{event: qr_code, data: {code}}.
- fetch_latest_qr: drop the second competing 'auth' spawn (lock contention,
wrong format); the streaming consumer is now the QR source.
- auth/start endpoint + UI: surface 'wacli not found' instead of silently
no-opping when the binary is missing.
This was referenced Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3.
Re-points the WhatsApp integration from the stale pre-0.5 vendored snapshot
(
github.com/steipete/wacli,0.5.0-Unreleased, whatsmeow pinned Feb 2026)to a pinned upstream binary (
github.com/openclaw/wacli@v0.11.0). The threeknown pains — auth loss, stale sync, lock contention — are all fixed upstream.
Changes
tools/wacli/source tree (73 files). The Dockerimage now
go installs the pinned tag (WACLI_VERSIONARG, CGO +sqlite_fts5)into
/usr/local/bin. Dropped nodejs/npm/corepack/pnpm — only the vendoredbuild needed them.
make dev-wainstalls the same tag into~/go/bin.main.godevice-label patch is replaced byWACLI_DEVICE_LABEL=MPA(native since 0.2.0), set via DockerENVand injectedby the wrapper/executor. The
client.go+-strip and wait-for-Connected patchesare dropped (native E.164 canonicalization since 0.9.0; presence/connect handling
since 0.10.0).
core/wacli.py).--lock-wait 30son every call (wait forthe store lock instead of fail-fast);
--read-onlyon pure reads (auth status,messages list) to skip the session lock. Binary resolves via
WACLI_BIN→ PATH →~/go/bin.core/executor.py). Same binary resolution; injects the devicelabel for agent-run
waclicommands.--read-only,--lock-wait,--account,--events) and newer commands (messages forward/revoke,send status,calls list); added an "Upgrading wacli" section covering the405-driven re-auth. Fixed the stale upstream link andtools/wacli/references.Operator action after merge
Crossing the
405/protocol boundary invalidates the session: re-authenticateonce (admin UI → Channels → WhatsApp → rescan QR). Only
session.dbchanges;the message store (
wacli.db) is preserved — back it up first.Verification
go install ...@v0.11.0builds clean (CGO +sqlite_fts5); resulting binaryreports
0.11.0and exposes all wrapper flags.ruff check .clean;pytest252 passed.