Package-level declarations

Types

Link copied to clipboard
data class FeatureFlag(val key: String, val defaultValue: String, val allowedValues: Set<String>, val type: FeatureFlagType = FeatureFlagType.STRING, val description: String = "", val mutable: Boolean = true, val source: String = "application")

A host-declared flag. Values are carried as strings so a flag can offer a choice between named options — a backend environment, an account tier — rather than only on or off. Booleans remain first-class through ofBoolean and SessionFeatureFlags.booleanValue.

Link copied to clipboard

A host-facing flag contract: session overrides never mutate the provider's default.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface StateMutationResult
Link copied to clipboard
class StateMutator(val id: String, val inputSchema: String = "{", mutate: (String) -> StateMutationResult)

Explicit host command; the SDK never reflects over arbitrary application objects.

Link copied to clipboard
interface StateProvider
Link copied to clipboard
Link copied to clipboard
data class StateSnapshot(val values: Map<String, StateValue>)
Link copied to clipboard
sealed interface StateValue

Functions

Link copied to clipboard
fun stateProvider(id: String, snapshot: () -> StateSnapshot): StateProvider