OpenClaw merged a large dependency cleanup this morning that removes Sharp-related dependency chains from key build and plugin paths. PR #134923, refactor(deps): remove Sharp dependency chains, touches docs, WhatsApp Web media handling, Memory LanceDB packaging, repository scripts, and dependency tooling.
The headline is not simply "fewer packages." The PR keeps PNG rendering support where it is still needed, while removing Sharp, @img, Transformers, and ONNX package entries from the regenerated pnpm lockfile. That should make installation and plugin packaging less exposed to heavyweight native image and ML transitive dependencies.
What Changed
The PR reports a small runtime delta and a much larger dependency effect. Production runtime changes are listed as +27/-24 lines, while build and dependency tooling changes are +13/-5. Tests grow more substantially, and the lockfile drops hundreds of lines.
The important ownership split is that PNG rendering remains supported, but broad Sharp dependency chains are no longer pulled through places that do not need them. The merge evidence calls out three concrete areas:
- WhatsApp media preparation still encrypts and uploads original images through the captured transport and handles JPEG previews.
- Memory LanceDB plugin packaging installs the host-native LanceDB binding without dragging Sharp or Transformers into the clean standalone tarball.
- Root build artifacts pass with external LanceDB-wrapper, Sharp, and Transformers imports denied.
That combination suggests a targeted cleanup rather than a blanket image-feature removal.
Why It Matters
Native dependency chains are operationally expensive. They can increase install time, widen platform-specific failure modes, and pull extra binaries into plugin or runtime surfaces that do not directly need them.
For OpenClaw, that matters because the project spans desktop apps, messaging channels, plugin packages, local memory extensions, and hosted build flows. A dependency that is harmless in one path can be noisy or brittle in another.
By removing Sharp-related chains from these paths while retaining required rendering behavior, OpenClaw narrows the package graph without making image features disappear.
Verification Signals
The PR reports several behavior-focused checks. Real Baileys media preparation encrypts and uploads the original image through a captured transport, with valid JPEG previews on success and empty previews after injected metadata or encoding failures. Both failure cases reportedly fail against the previous helper.
For Memory LanceDB, a clean standalone plugin tarball installation contains the host-native LanceDB binding and excludes Sharp and Transformers. Native vector store behavior, scoped search, cross-agent delete denial, close/reopen, and delete all pass.
A real 960 by 540 meme PNG rendered and decoded with Sharp while network access was denied, and SVG plus missing-renderer behavior passed. Full pnpm build, targeted TypeScript, lint, format checks, dependency pin checks, and root, WhatsApp, and memory npm lock validators also passed.
Hosted validation later passed on Linux and Windows. Fresh Codex review found no actionable P0 findings. The PR notes that an initial CI run caught an obsolete WhatsApp assertion-baseline count, which was then removed.
Boundaries
The merge is careful about what it does not claim. The Baileys media proof is media-boundary proof, not live WhatsApp delivery. The documentation follow-up about Memory LanceDB's README host-version mismatch is named as pre-existing and separate.
That explicit boundary is useful because dependency cleanups can be easy to overstate. This one appears focused: remove unnecessary dependency chains, preserve the rendering and media behavior that still belongs in product paths, and prove the result against real packaging and build checks.
Operator Takeaway
OpenClaw's package graph is getting leaner. Removing Sharp, Transformers, and ONNX chains from these build and plugin paths should reduce native dependency friction while keeping the image behaviors that the project still relies on.