Concrete type of the ComponentApi from the catalog.
The catalog's function kind. Every state and messaging
capability of the surface works with a schema-only catalog
(SurfaceModel<T, FunctionApi>); only node-tree resolution needs
implementations.
Initializes a new SurfaceModel instance.
Concrete type of the ComponentApi from the catalog.
The catalog's function kind. Every state and messaging
capability of the surface works with a schema-only catalog
(SurfaceModel<T, FunctionApi>); only node-tree resolution needs
implementations.
Unique identifier for this surface.
Catalog that resolves components and functions that do not name a catalog explicitly.
OptionalavailableCatalogs: ReadonlyMap<string, Catalog<T, F>> | null
Every catalog a payload on this surface may select
by catalogId, keyed by that identifier. The message processor populates
it with the catalogs whose protocol version is compatible with the
surface's own.
Optionaltheme: any
Theme to apply to this surface.
OptionalsendDataModel: boolean
Whether the renderer sends the full data model with actions.
OptionaldataModel: DataModel
Optional custom DataModel instance. If provided, the SurfaceModel assumes full ownership of its lifecycle and will dispose it when dispose() is called.
OptionalrootId: string
Identifier of the root component on this surface (defaults to 'root').
ReadonlyavailableCatalogs available to this surface, keyed by catalog ID.
Payloads on this surface may select any of these catalogs by catalogId.
Includes the surface's defaultCatalog under its identifier.
ReadonlycomponentsCollection of component models for this surface.
ReadonlydataData model for this surface.
ReadonlydefaultCatalog that resolves components and functions that do not name a catalog explicitly.
ReadonlyidReadonlyonEvent source firing whenever an action is dispatched from this surface.
ReadonlyonEvent source firing whenever an error occurs on this surface.
ReadonlyonEvent source firing whenever a non-fatal warning occurs on this surface.
ReadonlyrootIdentifier of the root component on this surface (defaults to 'root').
ReadonlysendReadonlythemeThe surface's default catalog.
Use defaultCatalog. Renamed for symmetry with the other SDKs now that a surface can carry more than one catalog. This alias will be removed in a future release.
Dispatches an action from this surface to registered listeners.
Resolves event action payload details, propagates any explicit catalogId,
and emits an ActionPayload via onAction. Local function actions (functionCall)
are executed locally and are not emitted as agent actions.
Action payload (name and context) to dispatch.
Identifier of the component that triggered the action.
A promise that resolves once all registered listeners have processed the action.
Dispatches an error from this surface to registered listeners.
Error payload to dispatch, conforming to the renderer-to-agent schema.
A promise that resolves once all registered listeners have processed the error.
Dispatches a non-fatal warning from this surface to registered listeners.
The warning payload to dispatch.
Promise that resolves once listeners have handled the warning.
Disposes the surface, data model, components, and event emitters.
State model for a single UI surface.
Coordinates data binding, component state, and action dispatching.