-
fix(cua-driver-rs): macOS install 404 + config set not persisting to MCP sessions (#1518)
发布于
2026-05-14 17:19:18 +00:00 - fix(cua-driver-rs): macOS install 404 + config not persisting to MCP sessions
Install script 404 on Apple Silicon / Intel
The script built the tarball URL asdarwin-arm64-binary.tar.gzbut the
release only publishes a singledarwin-universal-binary.tar.gz(lipo'd
arm64 + x86_64). Fix: collapse alldarwin-*LABEL values to the universal
binary name; Linux per-arch tarballs (linux-x86_64-binary) are unchanged.config setnot visible in MCP sessions
cua-driver config set capture_mode visionwrote to~/.cua-driver/config.json
but MCP sessions always initialisedDriverConfigfrom defaults, so every
freshmcpinvocation reverted tocapture_mode=som. Two changes:-
ToolState::default()now callsload_driver_config()which reads
~/.cua-driver/config.jsonat startup, so CLIconfig setchanges
carry over automatically into every subsequent MCP session. -
The
set_configMCP tool now also writes through to disk via
write_driver_config_key(), so config changes made inside an MCP session
(e.g. viatools/call set_config) are likewise persisted for future sessions.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
- fix(cua-driver-rs): address CodeRabbit review on config persistence
- Use
u32::try_frominstead ofas u32cast in bothload_driver_config
andset_configinvoke to prevent silent truncation of oversized
max_image_dimension values; return an error to the caller when out-of-range write_driver_config_keynow returnsResult<(), String>instead of
swallowing I/O and JSON errors; callers log warnings on failure via
tracing::warn!rather than silently succeeding
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Co-authored-by: Claude Sonnet 4.6 noreply@anthropic.com
下载附件