Skip to main content

Module engine

Module engine 

Source
Expand description

The Engine trait — the daemon’s view of “a browser”.

The trait is small, synchronous, and platform-agnostic. The daemon drives an Engine from a Tokio context but never directly: every call is dispatched onto the engine’s dedicated thread (see crate::runtime), where the platform-specific WebKit port runs.

For the live wire types — Tree, [Node], Ref, [Role], Op — see vs_protocol.

Structs§

AuthBlob
Opaque encrypted-by-the-engine auth payload. The daemon hands the bytes to vs_store for at-rest encryption.
Download
One download the engine holds in memory, on its way to disk.
DownloadEntry
A captured download intent, without its payload. Listed by Engine::download_list so an agent can see what the page tried to save before committing to reading any of it.
EngineCapabilities
What an engine declares it can and cannot do.
LayoutBox
Result of Engine::layout: the computed box for a single ref.
PageHandle
An opaque engine-side handle to a page. The daemon associates each PageHandle with one pages row in vs-store.
RecFrame
One recorded frame streamed from the engine during automation.
Viewport
A viewport definition. Sizes are in CSS pixels; dpr is the device-pixel ratio.

Enums§

ActTarget
What Engine::act targets on a page.
Action
What Engine::act does at the target.
CaptureScope
Scope of a Engine::capture call.
CursorOp
Coordinate-addressed input operations: vs move-to, vs click-at, vs hover-at, vs drag. Native event dispatch on backends that support it (macOS today; Linux + Windows fall through to ENGINE_UNSUPPORTED until M7 wires GDK / CDP input).
DownloadSource
What Engine::download should hand back.
EngineError
What can go wrong when driving an engine.
InputMode
Input humanization mode. Wire form: --mode={human,careful,robotic}.
NodeRole
The role a node in Node would carry — re-exported for convenience. A11y role code as it appears on the wire.
WaitCondition
A condition for Engine::wait.

Constants§

DEFAULT_USER_AGENT
Default User-Agent the engine sets on each page. Mirrors a recent shipping Safari on macOS so anti-bot fingerprinters that match on the WKWebView default (which lacks the Version/X Safari/X suffix) don’t flag every request. Backends that support per-webview UA (WKWebView via setCustomUserAgent, WebKitGTK via webkit_settings_set_user_agent, WebView2 via Profile2 / coreWebView2.Settings.UserAgent) apply this string at construction.

Traits§

Engine
The browser engine, as the daemon sees it.

Type Aliases§

EngineResult
Convenience Result with EngineError as the error type.