RendererEffect

sealed interface RendererEffect

Something the renderer must act on that applying a message did not, and could not, do itself.

Two of the six agent-to-renderer messages do not change surface state at all — they ask the renderer to run a function, or hand back the result of one the renderer asked for. Folding them into state would lose them; dropping them would lose the response the specification says the renderer MUST send. So the fold returns them alongside the new state.

The state-changing messages report an effect too, so that a UI layer can tell what moved without diffing two whole RendererStates.

Inheritors

Types

Link copied to clipboard

The agent answered a callAgentFunction the renderer had sent.

Link copied to clipboard
data class ComponentsUpdated(val surfaceId: String, val ids: List<String>) : RendererEffect

Components were added to or replaced in a surface.

Link copied to clipboard
data class DataModelUpdated(val surfaceId: String, val path: JsonPointer) : RendererEffect

A surface's data model changed at path.

Link copied to clipboard
data class RendererFunctionRequested(val functionCallId: CallId, val call: FunctionCall) : RendererEffect

The agent asked the renderer to run call.

Link copied to clipboard
data class SurfaceCreated(val surfaceId: String) : RendererEffect

A surface was created. It is not renderable until its root component arrives.

Link copied to clipboard
data class SurfaceDeleted(val surfaceId: String) : RendererEffect

A surface was deleted along with its components and data.

Properties

Link copied to clipboard
open val surfaceId: String?

The surface this effect concerns, or null for effects that name no surface.