runDesktopRecorderSession

fun runDesktopRecorderSession(composeUiTest: ComposeUiTest, port: Int = 9095, deviceId: String = "desktop-undertest", streamingIntervalMs: Long = 300, useUnmergedTree: Boolean = true, keepRunning: () -> Boolean = { true })

Single-threaded desktop recorder session. Unlike CMPRecorderWebSocketClient (which streams from a background thread), this runs the main loop on the caller's thread — the Compose test thread of runComposeUiTest { }. Tree reads, screenshot capture and command execution (Ultron actions) all happen on the test thread, where Compose actions actually complete; only websocket I/O is moved to a background coroutine via lock-free queues.

This closes the desktop command path: background tree reads work, but background Ultron actions do not — they must run on the test thread (see DesktopRecorderLoopIntegrationTest / docs/ultron-compose-version-skew.md notes).

Blocks until keepRunning returns false or the connection drops. The generated desktop recorder test calls it with keepRunning = { true } (runs until the controller terminates the process).

Requires ComposeTestContainer to be initialized (the recorder reads the tree through it).