docs/design/cua-driver-0.17.0-upstream-sync.md
Move the vendored CUA Driver source from upstream
cua-driver-rs-v0.7.0 to the released cua-driver-rs-v0.17.0 tag while
preserving the Qwen-specific runtime and distribution contract.
The release tag, commit 10279552e2bbe479e367a082f78b1b98ee85a697, is the
source of truth. The local /Users/mochi/code/cua checkout, old design notes,
and generated artifacts are inputs for comparison only.
The upstream import is limited to trycua/cua:libs/cua-driver, mapped to
packages/cua-driver. Upstream monorepo workflows, root scripts, documentation,
and unrelated libraries are not imported automatically. Any new dependency on
those files must either be made package-local or explicitly mapped to an
existing Qwen Code facility.
The Qwen-owned release workflow remains .github/workflows/cd-cua-driver.yml.
It may receive the minimum changes required by the new driver build and release
contract, but it must continue to publish Qwen-owned artifacts.
The sync is incomplete unless all of these remain effective:
~/.cua-driver for upgrade compatibility; the isolated local-build
home remains ~/.qwen-cua-driver-local.CUA_DRIVER_RS_COORDINATE_SPACE=1 continues to provide the opt-in 0-1000
coordinate contract at the shared invocation boundary. It must cover every
new coordinate-bearing desktop and browser-adjacent tool or fail closed.MCP_MODEL_PAYLOAD_FILTER=1 continues to filter model-visible branding in
both MCP text content and structured content without altering binary media.The import includes the SDK-owned runtime, Python and TypeScript UniFFI SDKs,
typed browser automation, runtime permission modes, per-session capture scope,
snapshot-bound element tokens, the closed ActionResult contract,
verify_state, native menu invocation, clipboard tools, window framing, and
semantic cursor themes.
These are architectural replacements rather than independent leaf features. The Qwen coordinate and payload transformations must be reattached to the canonical SDK/tool boundary so CLI, MCP, direct SDK, private worker, and daemon execution cannot diverge.
.vendored-from ref to cua-driver-rs-v0.17.0..vendored-from, .vendored-patches.md, version references, Qwen
installers, and the Qwen release workflow together.Verification is layered so a green narrow unit test cannot hide a broken distribution or trust boundary:
npm run build && npm run typecheck for the enclosing repository.Signed/notarized release production and physical Windows/Linux/macOS GUI certification are outside local verification and must remain explicit release gates.