feat(kvm): macOS KVM backend (VA-93) #142
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/VA-93-macos-kvm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements VA-93: the macOS
vervain-agent-kvmbackend, so remote desktop (capture, input, display enumeration) works on macOS agents. VA-89 shipped the macOS agent with KVM stubbed toNotAvailable; this brings it to parity with the Linux (X11 / Wayland) and Windows (DXGI) backends, feeding the existing tile-diff + JPEG pipeline unchanged.What landed
CGDisplayCreateImagevia thecore-graphicssafe wrappers (same rationale the Windows backend uses thewindowscrate). Returns BGRA, mapping directly ontoPixelLayout::Bgrx(the DXGI layout), sostream.rsis reused rather than forked.capture_primary,capture_display(bydisplay-<id>name), andcapture_raw_frame(streaming) are all wired.CGEventCreateScrollWheelEvent2, hence thehighsierrafeature), and keyboard. Named keysyms map to macOS virtual keycodes; other single-character keysyms inject as a layout-independent Unicode string (mirrors the WindowsKEYEVENTF_UNICODEpath).CGGetActiveDisplayList+CGDisplayBounds, sameDisplayInfoshape; pixel sizes, offsets scaled points->pixels per display.NotAvailablenaming the permission and pointing atdocs/macos-permissions.md, never a silent black frame or dropped input. The doc also covers the LaunchAgent-vs-LaunchDaemon session implication for capture.Scope / follow-ups
CGDisplayCreateImageis functional but deprecated on macOS 14; a ScreenCaptureKit path for lower-overhead streaming is a noted follow-up (mirrors how Windows shipped a working MVP first).Testing
cfg(target_os = "macos")gated: the Linux and Windows builds are unaffected.cargo checkandcargo clippy --all-targets --deny warningsfor bothaarch64-apple-darwinandx86_64-apple-darwin(the macOS Rust typechecks and lints clean;cargo checkskips linking, so no macOS SDK was needed).clippy --deny warningsand the test suite pass (93 kvm tests, 0 regressions).Acceptance criteria
capture_raw_frame; renders pending on-device check)DisplayInfo🤖 Generated with Claude Code