-
Notifications
You must be signed in to change notification settings - Fork 994
Open
Description
Proposal: Implement Client Capabilities Generation
Reason
The A2UI server needs to know which components and functions the client supports to generate compatible UI. The MessageProcessor is the logical place to aggregate this information, but it currently lacks the logic to export registered catalogs as JSON Schema.
Design
Implement a getClientCapabilities() method in the MessageProcessor.
- Catalog Traversal: Iterate through all
Cataloginstances provided at construction. - Schema Conversion: Convert Zod schemas for every component and function into standard JSON Schema objects using
zod-to-json-schema. - External References: Use the "REF:" description tag convention (e.g.,
REF:common_types.json#/$defs/DynamicString) to detect common types and replace them with standard$refpointers in the output, preventing massive inlined schemas. - Envelope Matching: Ensure the generated component schemas are wrapped in the standard adjacency-list envelope (
id,component,weight).
Key Files
renderers/web_core/src/v0_9/processing/message-processor.tsrenderers/web_core/src/v0_9/catalog/types.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo