Expand description
smix-driver — the decide layer.
Wraps HttpRunnerClient (sense + act IPC) with host-side resolve
dispatch. The default path is: SDK call → driver.tap → tree() →
resolve_selector() → centroid → runner.tap_at_norm_coord()
(Apple native event chain).
§Failure model
All methods return Result<T, ExpectationFailure> — AI-readable
rendering lives in smix-error.
§Implicit wait
tap includes a 5s poll-and-retry loop: if the first
resolve_selector returns None, sleep 250 ms then re-fetch tree +
re-resolve, up to a 5s total budget. Once a candidate is found we
tap the same frame to avoid a split-fetch race.
Structs§
- ActOutcome
- What an act did, as opposed to what it attempted.
- Android
Driver - Android
Driverimpl. WrapsHttpRunnerClientconnecting to the Kotlin runner via adb-forwarded port (default 28080, configurable viaAndroidDriver::new(port)). - Capture
Span - When a captured frame’s pixels were sampled, as an interval.
- HitElement
- One element, as either side describes it.
- Http
Runner Client - IosDriver
- Driver wrapping
HttpRunnerClientwith host-side resolve dispatch. - OcrFrame
- Normalized OCR bounding box returned by
HttpRunnerClient::find_text_by_ocr. Coordinates are normalized to[0, 1]in UIKit coord space (top-left origin, y-down). Apple Vision’s native bbox is bottom-left origin + y-up — the swift handler converts before returning so all consumers see UIKit coords. - Press
Timing - What the runner reported about when a press was actually held, paired with what the host observed about the round trip.
- System
Popup - One system-popup discovered on the screen (alert / sheet / banner).
Enums§
- ActVerdict
- What an act turned out to have done.
- Frame
Placement - Where a captured frame sits relative to the press.
- Include
Scope includescope literal — currently onlyall-windows(system popups pierce the app frame).- Orientation
- Sim device orientation. Driver-level type; SDK exposes a 1:1
MaestroOrientationmirror for maestro yaml literal alignment. - Platform
- Platform identifier for cross-platform dispatch.
- Runner
Scroll Selector - Reduced selector shape used by
/scroll(text-or-id only; complex selectors are host-side-resolved before reaching the runner). - Runner
Transport Error - Transport-level failure (network, non-2xx, malformed body). Mirrors
TS
RunnerTransportError1:1. - TapMode
POST /tapmode discriminator.
Traits§
- Driver
- Sense + act capabilities for a single device. Two-trait architecture
pair with
smix_sdk::DeviceControl(sim/host control in smix-sdk).
Functions§
- front_
app_ of - The bundle id this description was taken from, read off the a11y tree’s root identifier.
- host_
now_ ms - Wall clock in milliseconds, for anchoring a press window and the captures taken alongside it to the same timeline.
- press_
frame_ placement - Was this frame captured while the touch was down?
- tap_
landed_ within - Did the touch land inside the element it aimed at?
Type Aliases§
- Simctl
Driver - Back-compat alias.
SimctlDriverwas renamed toIosDriverfor cross-platform naming; this alias keeps existing importsuse smix_driver::SimctlDrivercompiling.