packages/cua-driver/docs/uniffi-sdk-implementation-journal.md
Status: historical baseline plus RFC 2447 migration log
The original sections below record the daemon-client SDK shipped in 0.11.0. RFC 2447 supersedes that topology: the public typed SDK now owns the platform runtime, and daemon/MCP hosting is migrating downstream of it.
Deliver an experimental imported-SDK vertical slice in pull request #2341 where:
CuaDriver object invokes the existing daemon protocol without routing through MCP.codex/experimental-cua-driver-contract-sdk07cec13ec1ecf2336d842b156993a83d4f713bfed5a5e33d6d0b5dc4998c4985bc0704d6df2b0a1d0.31.0, matching the repository's Fleet SDK precedent.uniffi-bindgen-react-native / @ubjs/* 0.31.0-3.Version 0.11.0 initially shipped the FFI library as a daemon client. RFC 2447
supersedes that topology: CuaDriver.create() now owns the platform runtime in
the importing process, while connect() remains the explicit compatibility
path for an external daemon.
The public integration split remains:
The product boundary is reflected directly in packaging:
cua_driver.@trycua/cua-driver.cua-driver mcp through their runtime's existing MCP client
and do not import either language package..sdk, /sdk, .mcp, /mcp, .native, or /native alias exists;
native remains only an internal loader/artifact term.cua-driver-contract request types.ubrn generate napi bindings; it loads the same cdylib through @ubjs/node and currently requires a separately orchestrated Rust build.CuaDriver.create() constructs the platform runtime in the importing process;
it neither launches cua-driver nor opens daemon IPC.cua-driver serve constructs that same SDK-owned runtime and temporarily
exposes its private registry through the existing compatibility transport.create() and the transitional connect() path.swift-5.5 runtime. No rpath mutation is checked in or applied to release
artifacts.cua-driver-abi-header uses pinned cbindgen over the Rust ABI exports, and
CI rejects header drift. UniFFI still independently generates the
language-facing Python and TypeScript bindings from the safe Rust SDK.CuaDriver wrapper imports the exported C symbols, so Rust,
Python, and TypeScript all traverse the same native seam.cargo check --locked --workspace --all-targets passed. Existing
cross-platform example warnings remain outside this change.cargo test --locked -p cua-driver passed: 115 unit tests and all enabled
integration suites passed; GUI/environment-dependent cases remained ignored.cargo test --locked -p cua-driver-core passed: 329 unit tests, 2 contract
parity tests, and 3 session lifecycle tests.cargo test --locked -p cua-driver-sdk passed: 4 tests covering published
method parity, typed desktop calls, typed session output, and tool discovery.cargo run --locked -p cua-driver-contract --bin cua-contract-gen -- all --check
passed.node scripts/generate-uniffi-bindings.mjs --check rebuilt the release
cdylib and reproduced every checked-in Python and TypeScript binding.ctypes -> UniFFI -> Rust ->
Unix socket, and asserted all 14 typed methods are exported.npm audit --audit-level=high: 0 vulnerabilities.cua_driver.CuaDriver.connect(None) loaded the packaged library and
returned the canonical daemon socket path.@trycua/cua-driver loaded the packaged dylib successfully.@rpath/libcua_driver_sdk.dylib, and release CI asserts it before signing.sdk or native module, Node exported no /sdk, /native, or
/mcp subpath, and neither artifact contained the removed MCP facade files.npm audit (0 vulnerabilities).