Package-level declarations

Types

Link copied to clipboard
class AccessInfo(val connectUrl: String, val sessionCode: String, val expiresAtEpochMs: Long)

Ephemeral connect information for the SESSION_CODE flow. sessionCode is a complete access credential -- the live 8-character code -- and connectUrl embeds it in the #code= fragment. There is no on-device approval step: whoever presents the code within its TTL gets a full session. Never log, display outside the trusted device screen, or persist either value.

Link copied to clipboard

Network exposure requested by the host, passed per-call as StartRequest.bindingMode. Loopback is the safe default -- the dashboard speaks plaintext HTTP, and LAN exposes that traffic to anyone else on the local network; see docs/THREAT_MODEL.md at the repository root before ever passing LAN.

Link copied to clipboard

Network exposure declared on BrowserConfig (DevConsoleConfig.browserConfig.binding). Despite living on the host's DevConsoleConfig, this field is not currently consumed by the running server -- as of this writing, binding mode for an actual io.devconsole.DevConsole.startBrowser call is decided entirely by the separate StartRequest.bindingMode (which has its own BindingMode type and its own BindingMode.LOOPBACK default, independent of this field). Setting BrowserConfig.binding round-trips through DevConsoleConfig and back out, but has no effect on what the server actually binds to; treat StartRequest.bindingMode as the only thing that matters until this is wired up. See the KDoc on BindingMode for the other half of this relationship.

Link copied to clipboard
data class BrowserConfig(val binding: BrowserBinding = BrowserBinding.LOOPBACK, val portRange: IntRange = DEFAULT_PORT_RANGE_START..DEFAULT_PORT_RANGE_END, val sessionCodeTtlMs: Long = DEFAULT_SESSION_CODE_TTL_MS)

SESSION_CODE is the only browser-access flow; there is no longer an access-mode field to set.

Link copied to clipboard
data class BrowserEndpoint(val host: String, val port: Int, val bindingMode: BindingMode)

Public description of the server selected after a successful DevConsoleFacadeProvider.startBrowser.

Link copied to clipboard

A capture surface a host can independently opt into or out of at DevConsoleConfig construction time -- see DevConsoleConfig.captureCategories. Every gate downstream is fail-open: a config that is absent, or a gate lambda that throws, always means "capture", never "drop".

Link copied to clipboard
data class CaptureRule(val id: String, val host: String, val method: String? = null, val pathPrefix: String? = null, val enabled: Boolean = true)

A durable capture exclusion.

Link copied to clipboard
class CaptureRuleEngine(initialRules: List<CaptureRule> = emptyList())

Evaluates capture exclusions on the network capture hot path.

Link copied to clipboard

Durable backing store for CaptureRules; implementations must survive process restart.

Link copied to clipboard
data class ConfigValidationError(val code: ConfigValidationCode, val field: String, val message: String)
Link copied to clipboard
data class CrashPolicy(val crashCaptureEnabled: Boolean = true, val anrWatchdogEnabled: Boolean = true, val anrThresholdMs: Long = DEFAULT_ANR_THRESHOLD_MS, val breadcrumbDepth: Int = DEFAULT_BREADCRUMB_DEPTH, val maxStackChars: Int = DEFAULT_MAX_STACK_CHARS, val maxThreadsInDump: Int = DEFAULT_MAX_THREADS_IN_DUMP, val maxFramesPerThread: Int = DEFAULT_MAX_FRAMES_PER_THREAD)

Controls uncaught-exception and ANR capture depth.

Link copied to clipboard
data class DevConsoleConfig(val eventBufferCapacity: Int = DEFAULT_EVENT_BUFFER_CAPACITY, val stateProviders: List<StateProvider> = emptyList(), val featureFlags: List<FeatureFlag> = emptyList(), val composerEnabled: Boolean = false, val composerAllowedHosts: Set<String> = emptySet(), val stateMutationsEnabled: Boolean = false, val redactionPolicy: RedactionPolicy = RedactionPolicy.default())

Host configuration supplied to io.devconsole.DevConsole.initialize.

Link copied to clipboard
Link copied to clipboard
sealed class DevConsoleState

Lifecycle state of the SDK runtime, observable via io.devconsole.DevConsole.state (a StateFlow). This tracks the runtime -- whether io.devconsole.DevConsole.initialize has succeeded and whether the embedded browser server is bound -- not individual capture sources; network/socket/push recording is available as soon as Initialized is reached, independent of whether the server has ever been started.

Link copied to clipboard
data class EditingCapabilities(val preferences: Boolean = false, val featureFlags: Boolean = false, val database: Boolean = false, val files: Boolean = false, val mocks: Boolean = false, val requestExecution: Boolean = false, val captureRules: Boolean = false)
Link copied to clipboard
data class EventEnvelope(val id: UUID, val sessionId: UUID, val pluginId: String, val type: String, val timestampEpochMs: Long, val monotonicNanos: Long, val sequence: Long, val severity: EventSeverity, val summary: String, val correlationId: String? = null, val tags: Map<String, String> = emptyMap(), val payloadRef: String? = null, val schemaVersion: Int = CURRENT_SCHEMA_VERSION)
Link copied to clipboard
Link copied to clipboard
sealed interface InitResult

Outcome of io.devconsole.DevConsole.initialize (or the internal provisional auto-init call).

Link copied to clipboard
class InMemoryCaptureRuleStore(initialRules: List<CaptureRule> = emptyList()) : CaptureRuleStore

Test and default implementation; deliberately not durable.

Link copied to clipboard
sealed interface InspectorOpenResult

Outcome of io.devconsole.DevConsole.open -- launching the SDK's own in-app inspector (as opposed to the browser dashboard, which is io.devconsole.DevConsole.startBrowser's concern). The SDK never opens this on its own; it only launches from an explicit host trigger.

Link copied to clipboard
data class RetentionPolicy(val maxSessions: Int = DEFAULT_MAX_SESSIONS, val maxAgeMs: Long = DEFAULT_MAX_AGE_MS, val maxBytes: Long = DEFAULT_MAX_BYTES)
Link copied to clipboard
data class ScreenshotPolicy(val enabled: Boolean = false, val maxLongestEdgePx: Int = DEFAULT_MAX_LONGEST_EDGE_PX, val maxBytes: Long = DEFAULT_MAX_BYTES)

Controls whether and how io.devconsole.DevConsole.captureScreenshot may capture the foreground window.

Link copied to clipboard
sealed interface ScreenshotResult

Outcome of io.devconsole.DevConsole.captureScreenshot.

Link copied to clipboard
data class SessionPolicy(val maxAuthenticatedSessions: Int = DEFAULT_MAX_AUTHENTICATED_SESSIONS)

Concurrent-session cap. One access tier -- every session is equivalent, so the old CONTROL/ADMIN-specific caps are gone; maxAuthenticatedSessions alone still bounds total live sessions.

Link copied to clipboard
data class StartRequest(val bindingMode: BindingMode = BindingMode.LOOPBACK, val portRange: IntRange = DEFAULT_PORT_RANGE_START..DEFAULT_PORT_RANGE_END)

Stable host-facing server start options.

Link copied to clipboard
sealed interface StartResult

Outcome of io.devconsole.DevConsole.startBrowser / startBrowserAsync.

Link copied to clipboard
sealed interface StopReason

Why io.devconsole.DevConsole.stop / stopAsync was called; informational, does not change stop behavior.

Link copied to clipboard
data class StoragePolicy(val maxBytes: Long = DEFAULT_MAX_BYTES, val maxAgeMs: Long = DEFAULT_MAX_AGE_MS, val maxTimelineEvents: Int = DEFAULT_MAX_TIMELINE_EVENTS, val maxNetworkTransactions: Int = DEFAULT_MAX_NETWORK_TRANSACTIONS)