A2uiSurfaceStore
Applies A2UI envelopes and exposes reactive wire surfaces and component readiness projections.
import type { A2uiSurfaceStore } from '@threadplane/chat';Declaration
export interface A2uiSurfaceStore {
apply(message: A2uiMessage): void;
applyPartialArgs(toolCallId: string, envelopes: readonly A2uiMessage[]): void;
isPartialLive(toolCallId: string): boolean;
surface(surfaceId: string): Signal<A2uiSurface | undefined>;
readonly surfaces: Signal<Map<string, A2uiSurface>>;
surfaceState(surfaceId: string): Signal<A2uiSurfaceState | undefined>;
readonly surfaceStates: Signal<Map<string, A2uiSurfaceState>>;
}Members
apply · overload 1
apply(message: A2uiMessage): void;Parameters
message· requiredA2uiMessage
Returns
voidapplyPartialArgs · overload 1
Live-stream entry point. Iterates envelopes and feeds each through
apply(). Records the tool_call_id so the wrapped-content classifier
can short-circuit duplicate dispatch when the final AIMessage arrives.
applyPartialArgs(toolCallId: string, envelopes: readonly A2uiMessage[]): void;Parameters
toolCallId· requiredstringenvelopes· requiredreadonly A2uiMessage[]
Returns
voidisPartialLive · overload 1
True if a tool_call_id has produced live envelopes via applyPartialArgs.
isPartialLive(toolCallId: string): boolean;Parameters
toolCallId· requiredstring
Returns
booleansurface · overload 1
surface(surfaceId: string): Signal<A2uiSurface | undefined>;Parameters
surfaceId· requiredstring
Returns
Signal<A2uiSurface | undefined>surfaces
Wire-format surfaces, for downstream consumers (e.g. surfaceToSpec).
readonly surfaces: Signal<Map<string, A2uiSurface>>;surfaceState · overload 1
surfaceState(surfaceId: string): Signal<A2uiSurfaceState | undefined>;Parameters
surfaceId· requiredstring
Returns
Signal<A2uiSurfaceState | undefined>surfaceStates
Chat-side projections with per-component readiness.
readonly surfaceStates: Signal<Map<string, A2uiSurfaceState>>;