StateRegistry

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun mutate(providerId: String, mutatorId: String, input: String): StateMutationResult?
Link copied to clipboard

The mutation catalogue for a provider -- empty (not null) for an unknown id or a read-only provider. Public because sdk:server-ktor (a separate Gradle module, so internal here would not be reachable from it) reads this to serialize the dashboard's provider-detail and mutator-catalogue responses; hosts supply mutators and never read this back themselves. Returns a fresh copy rather than StateProvider.mutators's own list instance: that property's default is emptyList(), but nothing stops an implementation from backing it with a live MutableList, and hosts can only reach StateProvider through this SDK's public state artifact -- so a caller who upcasts the result would otherwise get a live handle into the provider's own mutable state instead of a snapshot of its catalogue.

Link copied to clipboard
Link copied to clipboard
fun register(provider: StateProvider)
Link copied to clipboard