diff --git a/apps/website/content/docs/a2ui/api/api-docs.json b/apps/website/content/docs/a2ui/api/api-docs.json index ed322a41f..15fb63358 100644 --- a/apps/website/content/docs/a2ui/api/api-docs.json +++ b/apps/website/content/docs/a2ui/api/api-docs.json @@ -181,22 +181,16 @@ "description": "", "properties": [ { - "name": "args", - "type": "Record", - "description": "", - "optional": true - }, - { - "name": "call", - "type": "string", - "description": "", + "name": "condition", + "type": "unknown", + "description": "A DynamicBoolean — typically a validator function call (`required`,\n`regex`, `length`, `numeric`, `email`) or a logic combinator. The rule\npasses when the condition resolves to `true`.", "optional": false }, { "name": "message", "type": "string", - "description": "", - "optional": true + "description": "Error message displayed when the check fails.", + "optional": false } ], "examples": [] diff --git a/apps/website/content/docs/a2ui/reference/schema.mdx b/apps/website/content/docs/a2ui/reference/schema.mdx index a463bd7f8..aa666d5c2 100644 --- a/apps/website/content/docs/a2ui/reference/schema.mdx +++ b/apps/website/content/docs/a2ui/reference/schema.mdx @@ -83,7 +83,7 @@ interface A2uiComponentBase { } ``` -Input components additionally mix in `A2uiCheckable` (`checks?: A2uiCheck[]`) for client-side validation rules (typed now, enforced in a later phase). +Input components additionally mix in `A2uiCheckable` (`checks?: A2uiCheck[]`). Each rule is the spec `CheckRule` shape — `{ condition: DynamicBoolean, message: string }` — where `condition` is typically a validator call (`required`, `regex`, `length`, `numeric`, `email`) or a logic combination. Renderers evaluate rules against the live data model and block event actions while any rule fails. The basic-catalog component shapes are: @@ -130,7 +130,7 @@ Several fields are constrained to a fixed enum. Emit one of the listed values The union of the basic-catalog shapes is exported as `A2uiCatalogComponent`. The broader `A2uiComponent` also admits non-basic-catalog components (`A2uiComponentBase & Record`) — renderers treat unknown `component` strings as unrenderable and fall back gracefully. -The schema exposes `validationRegexp` on `TextField` and `checks` on input components, but validation execution is not implemented in this package. Treat schema fields as protocol data until a renderer wires behavior. +The schema exposes `validationRegexp` on `TextField` and `checks` on input components; this package supplies the validator functions in `createA2uiFunctionRegistry()`, and `@threadplane/chat`'s surface renderer enforces the rules (inline messages, blocked event actions, `VALIDATION_FAILED` error messages). ## Message envelopes diff --git a/apps/website/content/docs/chat/a2ui/catalog.mdx b/apps/website/content/docs/chat/a2ui/catalog.mdx index 36e6b75d1..808eebb43 100644 --- a/apps/website/content/docs/chat/a2ui/catalog.mdx +++ b/apps/website/content/docs/chat/a2ui/catalog.mdx @@ -431,7 +431,7 @@ Renders an HTML5 `