import { SurfaceModel, ActionListener } from '../state/surface-model.js'; import { Catalog, ComponentApi } from '../catalog/types.js'; import { SurfaceGroupModel } from '../state/surface-group-model.js'; import { Subscription } from '../common/events.js'; import { A2uiMessage, A2uiMessageListWrapper } from '../schema/server-to-client.js'; import { A2uiClientCapabilities } from '../schema/client-capabilities.js'; import { A2uiClientDataModel } from '../schema/client-to-server.js'; /** * Options for generating client capabilities. */ export interface CapabilitiesOptions { /** If true, the full definition of all catalogs will be included. */ includeInlineCatalogs?: boolean; } /** * The central processor for A2UI messages. * @template T The concrete type of the ComponentApi. */ export declare class MessageProcessor { private catalogs; private actionHandler?; readonly model: SurfaceGroupModel; /** * Creates a new message processor. * * @param catalogs A list of available catalogs. * @param actionHandler A global handler for actions from all surfaces. */ constructor(catalogs: Catalog[], actionHandler?: ActionListener | undefined); /** * Generates the a2uiClientCapabilities object for the current processor. * * @param options Configuration for capability generation. * @returns The capabilities object. */ getClientCapabilities(options?: CapabilitiesOptions): A2uiClientCapabilities; private generateInlineCatalog; private processRefs; /** * Returns the aggregated data model for all surfaces that have 'sendDataModel' enabled. */ getClientDataModel(): A2uiClientDataModel | undefined; /** * Subscribes to surface creation events. */ onSurfaceCreated(handler: (surface: SurfaceModel) => void): Subscription; /** * Subscribes to surface deletion events. */ onSurfaceDeleted(handler: (id: string) => void): Subscription; /** * Processes a list of messages or a messages wrapper. * * @param messages The messages or messages wrapper to process. */ processMessages(messages: A2uiMessage[] | A2uiMessageListWrapper): void; private processMessage; private processCreateSurfaceMessage; private processDeleteSurfaceMessage; private processUpdateComponentsMessage; private processUpdateDataModelMessage; /** * Resolves a relative path against a context path. * * @param path The path to resolve. * @param contextPath The base path (optional). */ resolvePath(path: string, contextPath?: string): string; } //# sourceMappingURL=message-processor.d.ts.map