AutographProvider

fun AutographProvider(tracker: Tracker, autocapture: AutocaptureConfig? = null, scopeStack: ScopeStack? = null, content: @Composable () -> Unit)

Provides tracker to the composition via LocalTracker and wires application lifecycle events (foreground/background) into the tracker's session bookkeeping.

Pass autocapture to also report taps app-wide without instrumenting every element with trackClick — opt-in, since observing every tap is a meaningfully different privacy posture than explicit instrumentation. See AutocaptureConfig.

Pass scopeStack only in a hybrid app — one where part of the UI is Compose and part is native (UIKit/SwiftUI, or the Android View system) — and the native side runs its own capture pipeline. Both sides must then read and write the same stack: TrackedScreen and AutographScope push their frames into it here, and the native pipeline resolves a tap's screen and scope by reading it. Left null, this provider owns a private stack, which is correct for a Compose-only app but would leave the two sides attributing events against separate, half-empty contexts. Owning the stack outside the composition is also what lets it outlive a recomposition while still being replaceable on logout — scope it to the same lifetime as tracker.