{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://horizonui.dev/a2ui/v1/catalog.json",
  "title": "HorizonUI",
  "description": "The HorizonUI catalog: the A2UI basic components and HorizonUI's agent-facing components (layout, actions, inputs, data, feedback, navigation and AI), drawn with HorizonUI on every platform.",
  "catalogId": "https://horizonui.dev/a2ui/v1/catalog.json",
  "protocolVersion": "1.0",
  "instructions": "HorizonUI is a design system for developer tools and agent consoles. Build each surface from its components: the A2UI basic components (Text, Row, Column, Button, TextField, CheckBox, Card, ...), drawn and extended by HorizonUI, and the HorizonUI components for forms, data, feedback and agent work (FormField, Stat, DataGrid, ToolRun, PermissionPrompt, DiffReview, DecisionCard, ...). Each component's description says when to use it.\n\n## Choosing components\n\n1. Prefer the specific component to an assembly of generic ones: a PermissionPrompt for an approval, a DiffReview for a change, a ToolRun for a tool call, a PlanChecklist for a plan, a Stat for a headline number, a DataGrid or ResourceTable for rows, Markdown for prose.\n2. Use Column (vertical) and Row (horizontal) for layout, with `gap` for spacing. Wrap a group of related content in a Card with a title.\n3. Put every form input in a FormField with a label. Bind each input's value to the data model with `{\"@path\": ...}` so the action that submits the form can send it in its context.\n4. Use one primary or accent Button per surface, for the action you expect.\n5. Tone and status values carry meaning: \"success\" done, \"warning\" needs attention, \"danger\" failed or destructive, \"ai\" produced by the agent, \"info\" neutral notice.\n6. Icon props take a HorizonUI icon name such as \"Check\", \"GitBranch\", \"Terminal\", \"Sparkles\", \"Warning\", \"File\", \"Folder\", \"Settings\".\n\n## Data and actions\n\n1. A2UI has no `+` operator. To build a string from data, call `formatString` with `${...}` placeholders: `{\"@call\": \"formatString\", \"args\": {\"value\": \"Hello ${/user/name}\"}}`.\n2. A component's text and number props take a literal or a binding. Lists and objects (rows, items, files) take a literal or a binding to a list in the data model; update the data model to change them.\n3. Inputs and choice components write the user's value to the bound path. An action's `event.context` reads it back, for example `{\"decision\": {\"@path\": \"/approval/decision\"}}`.\n4. Actions on items of a list (a node, a row, a hunk) carry the item in the action's `metadata.extensions.horizonui`, as each action's description says.\n5. Put validation messages in the input's `@checks`; do not add components to show them.\n6. Follow the requested hierarchy exactly: a component described as inside another must be its child.",
  "components": {
    "Text": {
      "type": "object",
      "properties": {
        "component": {
          "const": "Text"
        },
        "text": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The text content to display. While simple Markdown formatting is supported (i.e. without HTML, images, or links), utilizing dedicated UI components is generally preferred for a richer and more structured presentation."
        },
        "variant": {
          "type": "string",
          "description": "A hint for the base text style.",
          "enum": [
            "caption",
            "body"
          ],
          "default": "body"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "text"
      ]
    },
    "Image": {
      "type": "object",
      "properties": {
        "component": {
          "const": "Image"
        },
        "url": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The URL of the image to display."
        },
        "description": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Accessibility text for the image."
        },
        "fit": {
          "type": "string",
          "description": "Specifies how the image should be resized to fit its container. This corresponds to the CSS 'object-fit' property.",
          "enum": [
            "contain",
            "cover",
            "fill",
            "none",
            "scaleDown"
          ],
          "default": "fill"
        },
        "variant": {
          "type": "string",
          "description": "A hint for the image size and style.",
          "enum": [
            "icon",
            "avatar",
            "smallFeature",
            "mediumFeature",
            "largeFeature",
            "header"
          ],
          "default": "mediumFeature"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "url"
      ]
    },
    "Icon": {
      "type": "object",
      "properties": {
        "component": {
          "const": "Icon"
        },
        "name": {
          "description": "The name of the icon to display.",
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "accountCircle",
                "add",
                "arrowBack",
                "arrowForward",
                "attachFile",
                "calendarToday",
                "call",
                "camera",
                "check",
                "close",
                "delete",
                "download",
                "edit",
                "event",
                "error",
                "fastForward",
                "favorite",
                "favoriteOff",
                "folder",
                "help",
                "home",
                "info",
                "locationOn",
                "lock",
                "lockOpen",
                "mail",
                "menu",
                "moreVert",
                "moreHoriz",
                "notificationsOff",
                "notifications",
                "pause",
                "payment",
                "person",
                "phone",
                "photo",
                "play",
                "print",
                "refresh",
                "rewind",
                "search",
                "send",
                "settings",
                "share",
                "shoppingCart",
                "skipNext",
                "skipPrevious",
                "star",
                "starHalf",
                "starOff",
                "stop",
                "upload",
                "visibility",
                "visibilityOff",
                "volumeDown",
                "volumeMute",
                "volumeOff",
                "volumeUp",
                "warning"
              ]
            },
            {
              "type": "object",
              "properties": {
                "svgPath": {
                  "$ref": "common_types.json#/$defs/DynamicString"
                }
              },
              "required": [
                "svgPath"
              ],
              "additionalProperties": false
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "name"
      ]
    },
    "Video": {
      "type": "object",
      "properties": {
        "component": {
          "const": "Video"
        },
        "url": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The URL of the video to display."
        },
        "posterUrl": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The URL of the poster image to display before the video plays."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "url"
      ]
    },
    "AudioPlayer": {
      "type": "object",
      "properties": {
        "component": {
          "const": "AudioPlayer"
        },
        "url": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The URL of the audio to be played."
        },
        "description": {
          "description": "A description of the audio, such as a title or summary.",
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "url"
      ]
    },
    "Row": {
      "type": "object",
      "description": "Horizontal flex layout. Use to place components side by side: a row of badges, a label with its value, a toolbar of buttons.",
      "properties": {
        "component": {
          "const": "Row"
        },
        "children": {
          "description": "Defines the children. Use an array of strings for a fixed set of children, or a template object to generate children from a data list. Children cannot be defined inline, they must be referred to by ID.",
          "$ref": "common_types.json#/$defs/ChildList"
        },
        "justify": {
          "type": "string",
          "description": "Defines the arrangement of children along the main axis (horizontally). Use 'spaceBetween' to push items to the edges, or 'start'/'end'/'center' to pack them together.",
          "enum": [
            "center",
            "end",
            "spaceAround",
            "spaceBetween",
            "spaceEvenly",
            "start",
            "stretch"
          ],
          "default": "start"
        },
        "align": {
          "type": "string",
          "description": "Defines the alignment of children along the cross axis (vertically). This is similar to the CSS 'align-items' property, but uses camelCase values (e.g., 'start').",
          "enum": [
            "start",
            "center",
            "end",
            "stretch"
          ],
          "default": "stretch"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        },
        "gap": {
          "description": "Spacing step between children.",
          "type": "number",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            6,
            8
          ],
          "default": 2
        },
        "wrap": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": false
        }
      },
      "required": [
        "component",
        "children"
      ]
    },
    "Column": {
      "type": "object",
      "description": "Vertical flex layout with a fixed gap scale. Use to stack components vertically with even spacing; the default container for a surface.",
      "properties": {
        "component": {
          "const": "Column"
        },
        "children": {
          "description": "Defines the children. Use an array of strings for a fixed set of children, or a template object to generate children from a data list. Children cannot be defined inline, they must be referred to by ID.",
          "$ref": "common_types.json#/$defs/ChildList"
        },
        "justify": {
          "type": "string",
          "description": "Defines the arrangement of children along the main axis (vertically). Use 'spaceBetween' to push items to the edges (e.g. header at top, footer at bottom), or 'start'/'end'/'center' to pack them together.",
          "enum": [
            "start",
            "center",
            "end",
            "spaceBetween",
            "spaceAround",
            "spaceEvenly",
            "stretch"
          ],
          "default": "start"
        },
        "align": {
          "type": "string",
          "description": "Defines the alignment of children along the cross axis (horizontally). This is similar to the CSS 'align-items' property.",
          "enum": [
            "center",
            "end",
            "start",
            "stretch"
          ],
          "default": "stretch"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        },
        "gap": {
          "description": "Spacing step between children.",
          "type": "number",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            6,
            8
          ],
          "default": 2
        }
      },
      "required": [
        "component",
        "children"
      ]
    },
    "List": {
      "type": "object",
      "properties": {
        "component": {
          "const": "List"
        },
        "children": {
          "description": "Defines the children. Use an array of strings for a fixed set of children, or a template object to generate children from a data list.",
          "$ref": "common_types.json#/$defs/ChildList"
        },
        "direction": {
          "type": "string",
          "description": "The direction in which the list items are laid out.",
          "enum": [
            "vertical",
            "horizontal"
          ],
          "default": "vertical"
        },
        "align": {
          "type": "string",
          "description": "Defines the alignment of children along the cross axis.",
          "enum": [
            "start",
            "center",
            "end",
            "stretch"
          ],
          "default": "stretch"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "children"
      ]
    },
    "Card": {
      "type": "object",
      "description": "A surface that groups related content. Use to group related content under a title, with optional actions in the header and a footer.",
      "properties": {
        "component": {
          "const": "Card"
        },
        "child": {
          "$ref": "common_types.json#/$defs/Child",
          "description": "The ID of the single child component to be rendered inside the card. To display multiple elements, you MUST wrap them in a layout component (like Column or Row) and pass that container's ID here. Do NOT pass multiple IDs or a non-existent ID."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The card title."
        },
        "description": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "A line under the title."
        },
        "actions": {
          "$ref": "common_types.json#/$defs/ComponentId",
          "description": "A component shown at the right of the header, usually an Inline of buttons."
        },
        "footer": {
          "$ref": "common_types.json#/$defs/ComponentId",
          "description": "A component shown under the body, usually an Inline of buttons."
        },
        "padding": {
          "type": "string",
          "enum": [
            "sm",
            "md",
            "lg",
            "none"
          ],
          "default": "md"
        },
        "elevation": {
          "description": "Shadow level. 0 is a hairline ring only.",
          "type": "number",
          "enum": [
            0,
            1,
            2,
            3,
            4
          ],
          "default": 1
        },
        "interactive": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Hover lifts one elevation level and 1px; the card becomes focusable."
        },
        "disabled": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Disables an interactive card."
        },
        "onClick": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when an interactive card is clicked."
        }
      },
      "required": [
        "component"
      ]
    },
    "Tabs": {
      "type": "object",
      "description": "Tabbed navigation. Use to split related content into views the user switches between.",
      "properties": {
        "component": {
          "const": "Tabs"
        },
        "tabs": {
          "type": "array",
          "description": "An array of objects, where each object defines a tab with a title and a child component.",
          "minItems": 1,
          "items": {
            "type": "object",
            "properties": {
              "title": {
                "description": "The tab title.",
                "$ref": "common_types.json#/$defs/DynamicString"
              },
              "child": {
                "$ref": "common_types.json#/$defs/Child",
                "description": "The ID of the child component."
              }
            },
            "required": [
              "title",
              "child"
            ],
            "additionalProperties": false
          }
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        },
        "variant": {
          "description": "`pill` (default): a well with a sliding keycap.",
          "type": "string",
          "enum": [
            "underline",
            "pill"
          ],
          "default": "pill"
        },
        "size": {
          "type": "string",
          "enum": [
            "sm",
            "md"
          ],
          "default": "md"
        }
      },
      "required": [
        "component",
        "tabs"
      ]
    },
    "Modal": {
      "type": "object",
      "properties": {
        "component": {
          "const": "Modal"
        },
        "trigger": {
          "$ref": "common_types.json#/$defs/Child",
          "description": "The ID of the component that opens the modal when interacted with (e.g., a button)."
        },
        "content": {
          "$ref": "common_types.json#/$defs/Child",
          "description": "The ID of the component to be displayed inside the modal."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "trigger",
        "content"
      ]
    },
    "Divider": {
      "type": "object",
      "description": "1px hairline. Use to separate groups of content; give it a label to title the group that follows.",
      "properties": {
        "component": {
          "const": "Divider"
        },
        "axis": {
          "type": "string",
          "description": "The orientation of the divider.",
          "enum": [
            "horizontal",
            "vertical"
          ],
          "default": "horizontal"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "variant": {
          "description": "Line style of a plain horizontal divider.",
          "type": "string",
          "enum": [
            "solid",
            "dashed"
          ],
          "default": "solid"
        }
      },
      "required": [
        "component"
      ]
    },
    "Button": {
      "type": "object",
      "description": "The primary action control. Use for an action the user takes; one primary or accent button per surface.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "Button"
            },
            "child": {
              "$ref": "common_types.json#/$defs/Child",
              "description": "The ID of the child component. Use a 'Text' component for a labeled button. Only use an 'Icon' if the requirements explicitly ask for an icon-only button."
            },
            "variant": {
              "type": "string",
              "description": "A hint for the button style. If omitted, a default button style is used. 'primary' indicates this is the main call-to-action button. 'borderless' means the button has no visual border or background, making its child content appear like a clickable link.",
              "enum": [
                "default",
                "primary",
                "borderless",
                "accent",
                "secondary",
                "soft",
                "ghost",
                "danger",
                "ai"
              ],
              "default": "default"
            },
            "action": {
              "$ref": "common_types.json#/$defs/Action"
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            },
            "label": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The button text. Use instead of `child` for a plain text button."
            },
            "size": {
              "type": "string",
              "enum": [
                "sm",
                "md",
                "lg"
              ],
              "default": "md"
            },
            "loading": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Shimmer and spinner, `aria-busy`/`aria-disabled`, clicks and submits ignored.",
              "default": false
            },
            "leading": {
              "description": "Icon name shown before the label.",
              "type": "string"
            },
            "fullWidth": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Disables the button."
            }
          },
          "required": [
            "component",
            "action"
          ]
        }
      ]
    },
    "TextField": {
      "type": "object",
      "description": "Single-line text input in a sunken well. Use for short free text: a name, a URL, a search term.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "TextField"
            },
            "label": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The text label for the input field."
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The value of the text field."
            },
            "placeholder": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The placeholder text for the input field."
            },
            "variant": {
              "type": "string",
              "description": "The type of input field to display.",
              "enum": [
                "longText",
                "number",
                "shortText",
                "obscured"
              ],
              "default": "shortText"
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            },
            "size": {
              "type": "string",
              "enum": [
                "sm",
                "md",
                "lg"
              ],
              "default": "md"
            },
            "mono": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "clearable": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Clear button while the field has a value."
            },
            "leading": {
              "description": "Icon name shown inside the field, before the text.",
              "type": "string"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Disables the field."
            }
          },
          "required": [
            "component",
            "value"
          ]
        }
      ]
    },
    "CheckBox": {
      "type": "object",
      "description": "Checkbox with a well box that turns to ink when checked. Use for an independent yes/no option in a form; several may be checked.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "CheckBox"
            },
            "label": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The text to display next to the checkbox."
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "The current state of the checkbox (true for checked, false for unchecked)."
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            },
            "description": {
              "$ref": "common_types.json#/$defs/DynamicString"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            }
          },
          "required": [
            "component",
            "label",
            "value"
          ]
        }
      ]
    },
    "ChoicePicker": {
      "type": "object",
      "description": "A component that allows selecting one or more options from a list.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "ChoicePicker"
            },
            "label": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The label for the group of options."
            },
            "variant": {
              "type": "string",
              "description": "A hint for how the choice picker should be displayed and behave.",
              "enum": [
                "multipleSelection",
                "mutuallyExclusive"
              ],
              "default": "mutuallyExclusive"
            },
            "options": {
              "type": "array",
              "description": "The list of available options to choose from.",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "description": "The text to display for this option.",
                    "$ref": "common_types.json#/$defs/DynamicString"
                  },
                  "value": {
                    "type": "string",
                    "description": "The stable value associated with this option."
                  }
                },
                "required": [
                  "label",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicStringList",
              "description": "The list of currently selected values. This should be bound to a string array in the data model."
            },
            "displayStyle": {
              "type": "string",
              "description": "The display style of the component.",
              "enum": [
                "checkbox",
                "chips"
              ],
              "default": "checkbox"
            },
            "filterable": {
              "type": "boolean",
              "description": "If true, displays a search input to filter the options.",
              "default": false
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "options",
            "value"
          ]
        }
      ]
    },
    "Slider": {
      "type": "object",
      "description": "Slider with a well track, keycap thumbs and a value bubble while dragging. Use to pick a value in a range where the exact number matters less than the position (temperature, threshold).",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "Slider"
            },
            "label": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The label for the slider."
            },
            "min": {
              "type": "number",
              "description": "The minimum value of the slider.",
              "default": 0
            },
            "max": {
              "type": "number",
              "description": "The maximum value of the slider."
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "The current value of the slider."
            },
            "steps": {
              "type": "integer",
              "minimum": 1,
              "description": "The number of discrete divisions in the slider range. If specified, the slider will snap to discrete values."
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            },
            "showValue": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "default": true
            },
            "marks": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "tone": {
              "type": "string",
              "enum": [
                "accent",
                "ai"
              ],
              "default": "accent"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            }
          },
          "required": [
            "component",
            "value",
            "max"
          ]
        }
      ]
    },
    "DateTimeInput": {
      "type": "object",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "DateTimeInput"
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The selected date and/or time value in ISO 8601 format. If not yet set, initialize with an empty string."
            },
            "enableDate": {
              "type": "boolean",
              "description": "If true, allows the user to select a date.",
              "default": false
            },
            "enableTime": {
              "type": "boolean",
              "description": "If true, allows the user to select a time.",
              "default": false
            },
            "min": {
              "allOf": [
                {
                  "$ref": "common_types.json#/$defs/DynamicString"
                },
                {
                  "if": {
                    "type": "string"
                  },
                  "then": {
                    "oneOf": [
                      {
                        "format": "date"
                      },
                      {
                        "format": "time"
                      },
                      {
                        "format": "date-time"
                      }
                    ]
                  }
                }
              ],
              "description": "The minimum allowed date/time in ISO 8601 format."
            },
            "max": {
              "allOf": [
                {
                  "$ref": "common_types.json#/$defs/DynamicString"
                },
                {
                  "if": {
                    "type": "string"
                  },
                  "then": {
                    "oneOf": [
                      {
                        "format": "date"
                      },
                      {
                        "format": "time"
                      },
                      {
                        "format": "date-time"
                      }
                    ]
                  }
                }
              ],
              "description": "The maximum allowed date/time in ISO 8601 format."
            },
            "label": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The text label for the input field."
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "value"
          ]
        }
      ]
    },
    "Tray": {
      "type": "object",
      "description": "Raised tactile container for toolbars, action bars and palettes. Use for a raised strip that holds controls, such as the actions under a form.",
      "properties": {
        "component": {
          "const": "Tray"
        },
        "children": {
          "$ref": "common_types.json#/$defs/ChildList",
          "description": "Child component ids."
        },
        "padding": {
          "type": "string",
          "enum": [
            "sm",
            "md"
          ],
          "default": "md"
        },
        "radius": {
          "type": "string",
          "enum": [
            "key",
            "tray",
            "full"
          ],
          "default": "tray"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "children"
      ]
    },
    "IconButton": {
      "type": "object",
      "description": "Square icon-only button with an accessible name and a tooltip. Use for a compact action with a well-known icon (copy, refresh, close); the label becomes its tooltip.",
      "properties": {
        "component": {
          "const": "IconButton"
        },
        "icon": {
          "description": "Icon name from the HorizonUI icon set, e.g. \"GitBranch\", \"Sparkles\", \"Check\".",
          "type": "string"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Accessible name and tooltip."
        },
        "onClick": {
          "$ref": "common_types.json#/$defs/Action"
        },
        "variant": {
          "type": "string",
          "enum": [
            "secondary",
            "ghost",
            "ai"
          ],
          "default": "ghost"
        },
        "size": {
          "type": "string",
          "enum": [
            "sm",
            "md",
            "lg"
          ],
          "default": "md"
        },
        "selected": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Persistent toggled-on look; sets `aria-pressed`."
        },
        "tooltip": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Set false to skip the tooltip (when the button is already a Tooltip trigger).",
          "default": true
        },
        "loading": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Shimmer and spinner, `aria-busy`/`aria-disabled`, clicks and submits ignored."
        },
        "disabled": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Disables the button."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "icon",
        "label"
      ]
    },
    "ButtonGroup": {
      "type": "object",
      "description": "Groups related buttons. Use to group related buttons.",
      "properties": {
        "component": {
          "const": "ButtonGroup"
        },
        "children": {
          "$ref": "common_types.json#/$defs/ChildList",
          "description": "Button or IconButton ids."
        },
        "attached": {
          "$ref": "common_types.json#/$defs/DynamicBoolean"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "children"
      ],
      "allowedChildren": [
        "Button",
        "IconButton"
      ]
    },
    "SegmentedControl": {
      "type": "object",
      "description": "Exclusive choice in a pill well. Use for a choice between 2-5 views or modes that applies at once.",
      "properties": {
        "component": {
          "const": "SegmentedControl"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "icon": {
                "type": "string",
                "description": "Icon name from the HorizonUI icon set."
              },
              "disabled": {
                "type": "boolean"
              }
            },
            "required": [
              "value",
              "label"
            ],
            "additionalProperties": false
          }
        },
        "value": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The selected option value; bind it to read the choice."
        },
        "size": {
          "type": "string",
          "enum": [
            "sm",
            "md",
            "lg"
          ],
          "default": "md"
        },
        "disabled": {
          "$ref": "common_types.json#/$defs/DynamicBoolean"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "options"
      ]
    },
    "Link": {
      "type": "object",
      "description": "Inline text link. Use for navigation to a URL inside text-like content.",
      "properties": {
        "component": {
          "const": "Link"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The link text."
        },
        "href": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The URL (http, https or mailto)."
        },
        "external": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Opens in a new tab with `rel=\"noopener noreferrer\"` and shows an external-link glyph."
        },
        "muted": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Quiet colour for secondary navigation."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "label",
        "href"
      ]
    },
    "FormField": {
      "type": "object",
      "description": "Label, hint and validation message around an input. Use around every form input to give it a label, a hint and a validation message.",
      "properties": {
        "component": {
          "const": "FormField"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "child": {
          "$ref": "common_types.json#/$defs/ComponentId",
          "description": "The input component id."
        },
        "hint": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "message": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "validation": {
          "type": "string",
          "enum": [
            "none",
            "error",
            "warning",
            "success"
          ],
          "default": "none"
        },
        "required": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": false
        },
        "orientation": {
          "type": "string",
          "enum": [
            "horizontal",
            "vertical"
          ],
          "default": "vertical"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "child"
      ],
      "allowedChildren": [
        "TextField",
        "TextArea",
        "NumberField",
        "Select",
        "TagInput",
        "CheckBox",
        "Switch",
        "RadioGroup",
        "Slider",
        "SegmentedControl",
        "FileDrop",
        "DateTimeInput",
        "ChoicePicker"
      ]
    },
    "TextArea": {
      "type": "object",
      "description": "Multi-line text input in a sunken well. Use for multi-line text: a comment, a commit message, a prompt.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "TextArea"
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The text; bind it to read what the user types."
            },
            "placeholder": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "Shown while the field is empty."
            },
            "autoGrow": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Grow with content between `minRows` and `maxRows`.",
              "default": true
            },
            "minRows": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "default": 3
            },
            "maxRows": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "default": 12
            },
            "mono": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Disables the field."
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "value"
          ]
        }
      ]
    },
    "NumberField": {
      "type": "object",
      "description": "Numeric input with stacked stepper chevrons. Use for a bounded number with a unit: a timeout, a count, a budget.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "NumberField"
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "The number; bind it to read the user's value."
            },
            "min": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "default": 0
            },
            "max": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "default": 100
            },
            "step": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "default": 1
            },
            "unit": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "Suffix shown after the number (for example `px`)."
            },
            "size": {
              "type": "string",
              "enum": [
                "sm",
                "md",
                "lg"
              ]
            },
            "mono": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Disables the field."
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "value"
          ]
        }
      ]
    },
    "RadioGroup": {
      "type": "object",
      "description": "Exclusive choice. Use for one choice among 2-6 options that all need to stay visible.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "RadioGroup"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "disabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "value",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The selected option value; bind it to read the choice."
            },
            "orientation": {
              "type": "string",
              "enum": [
                "horizontal",
                "vertical"
              ],
              "default": "vertical"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "options"
          ]
        }
      ]
    },
    "Switch": {
      "type": "object",
      "description": "On/off switch. Use for a setting that takes effect at once (on/off).",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "Switch"
            },
            "checked": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Whether it is on; bind it to read the setting."
            },
            "label": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The setting's name."
            },
            "size": {
              "type": "string",
              "enum": [
                "sm",
                "md"
              ],
              "default": "md"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "checked"
          ]
        }
      ]
    },
    "Select": {
      "type": "object",
      "description": "Single choice from a list. Use for one choice among many options in little space.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "Select"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon name from the HorizonUI icon set."
                  },
                  "description": {
                    "type": "string"
                  },
                  "disabled": {
                    "type": "boolean"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "value",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The selected option value; bind it to read the choice."
            },
            "placeholder": {
              "$ref": "common_types.json#/$defs/DynamicString"
            },
            "size": {
              "type": "string",
              "enum": [
                "sm",
                "md",
                "lg"
              ],
              "default": "md"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "required": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "options"
          ]
        }
      ]
    },
    "TagInput": {
      "type": "object",
      "description": "Free-form tags. Use for a free list of short values: labels, reviewers, file globs.",
      "allOf": [
        {
          "$ref": "common_types.json#/$defs/Checkable"
        },
        {
          "type": "object",
          "properties": {
            "component": {
              "const": "TagInput"
            },
            "value": {
              "$ref": "common_types.json#/$defs/DynamicStringList",
              "description": "The tags; bind it to read the list."
            },
            "suggestions": {
              "$ref": "common_types.json#/$defs/DynamicStringList"
            },
            "placeholder": {
              "$ref": "common_types.json#/$defs/DynamicString"
            },
            "max": {
              "$ref": "common_types.json#/$defs/DynamicNumber"
            },
            "disabled": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "required": {
              "$ref": "common_types.json#/$defs/DynamicBoolean"
            },
            "weight": {
              "$ref": "#/$defs/Weight"
            }
          },
          "required": [
            "component",
            "value"
          ]
        }
      ]
    },
    "FileDrop": {
      "type": "object",
      "description": "Dashed drop zone. Use to ask the user for files.",
      "properties": {
        "component": {
          "const": "FileDrop"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "hint": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "accept": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "multiple": {
          "$ref": "common_types.json#/$defs/DynamicBoolean"
        },
        "status": {
          "description": "Lifecycle of the drop zone.",
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "error",
                "idle",
                "dragging",
                "uploading",
                "done"
              ]
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "progress": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "0-100, shown while uploading.",
          "default": 0
        },
        "disabled": {
          "$ref": "common_types.json#/$defs/DynamicBoolean"
        },
        "onFiles": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user drops or picks files. The renderer attaches the files' names, sizes and types as `files`."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "Badge": {
      "type": "object",
      "description": "Small status label. Use for a short status or count next to other content.",
      "properties": {
        "component": {
          "const": "Badge"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The badge text."
        },
        "tone": {
          "type": "string",
          "enum": [
            "accent",
            "danger",
            "ai",
            "warning",
            "success",
            "neutral",
            "info"
          ],
          "default": "accent"
        },
        "variant": {
          "type": "string",
          "enum": [
            "solid",
            "soft",
            "outline"
          ],
          "default": "soft"
        },
        "size": {
          "type": "string",
          "enum": [
            "sm",
            "md"
          ],
          "default": "md"
        },
        "icon": {
          "description": "Icon name from the HorizonUI icon set, e.g. \"GitBranch\", \"Sparkles\", \"Check\".",
          "type": "string"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "label"
      ]
    },
    "Tag": {
      "type": "object",
      "description": "Neutral label chip with an optional categorical dot, icon and remove button. Use for a neutral label or category; removable when the user may drop it.",
      "properties": {
        "component": {
          "const": "Tag"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The tag text."
        },
        "color": {
          "description": "Adds a leading categorical dot.",
          "type": "string",
          "enum": [
            "cat-1",
            "cat-2",
            "cat-3",
            "cat-4",
            "cat-5",
            "cat-6",
            "cat-7",
            "cat-8"
          ]
        },
        "icon": {
          "description": "Icon name from the HorizonUI icon set, e.g. \"GitBranch\", \"Sparkles\", \"Check\".",
          "type": "string"
        },
        "onRemove": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows a remove button; fires when it is pressed."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "label"
      ]
    },
    "ResourceChip": {
      "type": "object",
      "description": "Reference to a project, repo or service. Use to refer to a project, repository or service by name.",
      "properties": {
        "component": {
          "const": "ResourceChip"
        },
        "name": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "monogram": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Defaults to the initials of `name`."
        },
        "color": {
          "type": "string",
          "enum": [
            "cat-1",
            "cat-2",
            "cat-3",
            "cat-4",
            "cat-5",
            "cat-6",
            "cat-7",
            "cat-8"
          ],
          "default": "cat-2"
        },
        "avatarUrl": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "disabled": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Disables a clickable chip."
        },
        "onClick": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Makes the chip a button."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "name"
      ]
    },
    "Avatar": {
      "type": "object",
      "description": "Person or agent avatar. Use to show a person or an agent.",
      "properties": {
        "component": {
          "const": "Avatar"
        },
        "name": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "src": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "size": {
          "type": "number",
          "enum": [
            16,
            20,
            24,
            32,
            40
          ],
          "default": 24
        },
        "status": {
          "type": "string",
          "enum": [
            "online",
            "busy",
            "away",
            "offline"
          ]
        },
        "bot": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Agent avatar: Bot glyph on the AI gradient."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "name"
      ]
    },
    "AvatarStack": {
      "type": "object",
      "description": "Overlapping avatars with a \"+N\" overflow chip. Use to show who is involved (reviewers, participants) in little space.",
      "properties": {
        "component": {
          "const": "AvatarStack"
        },
        "people": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "src": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "max": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "default": 3
        },
        "size": {
          "type": "number",
          "enum": [
            16,
            20,
            24,
            32,
            40
          ],
          "default": 24
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "people"
      ]
    },
    "StatusPill": {
      "type": "object",
      "description": "Keycap status readout. Use for the state of a system or job (OK, syncing, error) as a compact readout.",
      "properties": {
        "component": {
          "const": "StatusPill"
        },
        "status": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "ai",
                "error",
                "warning",
                "idle",
                "syncing",
                "ok"
              ]
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "detail": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "DeltaPill": {
      "type": "object",
      "description": "A metric value with its change. Use for a metric value with its change since the previous period.",
      "properties": {
        "component": {
          "const": "DeltaPill"
        },
        "value": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The value, formatted (\"1.2k\", \"$40\")."
        },
        "delta": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Change in percent, not a fraction: 12.4 means +12.4%, 0.9 means +0.9%."
        },
        "tone": {
          "type": "string",
          "enum": [
            "accent",
            "danger",
            "ai",
            "warning",
            "success",
            "neutral",
            "info"
          ]
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "value",
        "delta"
      ]
    },
    "Stat": {
      "type": "object",
      "description": "A headline metric. Use for a headline number: a KPI with its label, change and trend.",
      "properties": {
        "component": {
          "const": "Stat"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "value": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The value, formatted."
        },
        "delta": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Change in percent, not a fraction: 12.4 means +12.4%, 0.9 means +0.9%."
        },
        "unit": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "spark": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "tone": {
          "description": "Colours the sparkline and the delta.",
          "type": "string",
          "enum": [
            "accent",
            "danger",
            "ai",
            "warning",
            "success",
            "neutral",
            "info"
          ]
        },
        "icon": {
          "description": "Icon name from the HorizonUI icon set, e.g. \"GitBranch\", \"Sparkles\", \"Check\".",
          "type": "string"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "label",
        "value"
      ]
    },
    "Sparkline": {
      "type": "object",
      "description": "Minimal trend line. Use for a small trend line inside text, tables or cards.",
      "properties": {
        "component": {
          "const": "Sparkline"
        },
        "data": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "height": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "default": 32
        },
        "tone": {
          "type": "string",
          "enum": [
            "accent",
            "danger",
            "ai",
            "warning",
            "success",
            "neutral",
            "info"
          ],
          "default": "accent"
        },
        "area": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Fill under the line fading to transparent.",
          "default": true
        },
        "animate": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Draw the line in over 600ms.",
          "default": true
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "data"
      ]
    },
    "PropertyGrid": {
      "type": "object",
      "description": "Two-column key/value list with optional collapsible groups and inline-editable values. Use for the properties of one object as key/value rows, optionally grouped.",
      "properties": {
        "component": {
          "const": "PropertyGrid"
        },
        "rows": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "mono": {
                    "type": "boolean"
                  },
                  "group": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "collapsibleGroups": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Group headers toggle their rows."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "rows"
      ]
    },
    "Timeline": {
      "type": "object",
      "description": "Vertical event list on a 1px rail. Use for events in time order: a deployment history, an audit log.",
      "properties": {
        "component": {
          "const": "Timeline"
        },
        "items": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "time": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "error",
                      "done",
                      "active",
                      "pending"
                    ]
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon name from the HorizonUI icon set."
                  }
                },
                "required": [
                  "id",
                  "title"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "items"
      ]
    },
    "Tree": {
      "type": "object",
      "description": "File and project tree. Use for a hierarchy: files of a change, a dependency tree.",
      "properties": {
        "component": {
          "const": "Tree"
        },
        "nodes": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/TreeNode"
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "selected": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Id of the selected node; bind it to read the selection."
        },
        "expanded": {
          "$ref": "common_types.json#/$defs/DynamicStringList",
          "description": "Ids of the nodes open at first."
        },
        "indentGuides": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": true
        },
        "onActivate": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when a node is opened (double click or Enter). The renderer attaches the node's id as `nodeId`."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "nodes"
      ]
    },
    "ResourceTable": {
      "type": "object",
      "description": "Compact resource listing. Use for a short list of resources with a status each (services, buckets, jobs).",
      "properties": {
        "component": {
          "const": "ResourceTable"
        },
        "rows": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "error",
                      "warning",
                      "ok",
                      "syncing"
                    ]
                  },
                  "updated": {
                    "type": "string"
                  },
                  "size": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "type",
                  "status",
                  "updated"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "rows"
      ]
    },
    "DataGrid": {
      "type": "object",
      "description": "Data grid with sortable headers, row selection, resizable columns, a sticky header and loading rows. Use for tabular data with sorting and row selection.",
      "properties": {
        "component": {
          "const": "DataGrid"
        },
        "columns": {
          "description": "The columns: a key into each row, a header, and optional width, alignment and sorting.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "header": {
                "type": "string"
              },
              "width": {
                "type": "number"
              },
              "minWidth": {
                "type": "number"
              },
              "align": {
                "type": "string",
                "enum": [
                  "left",
                  "right",
                  "center"
                ]
              },
              "sortable": {
                "type": "boolean"
              },
              "mono": {
                "type": "boolean"
              }
            },
            "required": [
              "key",
              "header"
            ],
            "additionalProperties": false
          }
        },
        "rows": {
          "description": "One object per row: an `id` plus a value for each column key.",
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ]
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "sort": {
          "description": "Sort at first: a column key and a direction.",
          "type": "object",
          "properties": {
            "key": {
              "type": "string"
            },
            "dir": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          "required": [
            "key",
            "dir"
          ],
          "additionalProperties": false
        },
        "selectable": {
          "$ref": "common_types.json#/$defs/DynamicBoolean"
        },
        "selected": {
          "$ref": "common_types.json#/$defs/DynamicStringList",
          "description": "Ids of the selected rows; bind it to read the selection."
        },
        "resizableColumns": {
          "$ref": "common_types.json#/$defs/DynamicBoolean"
        },
        "stickyHeader": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": true
        },
        "density": {
          "description": "Row height: comfortable = list row, compact = dense row.",
          "type": "string",
          "enum": [
            "compact",
            "comfortable"
          ],
          "default": "comfortable"
        },
        "maxHeight": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Height in px after which the body scrolls."
        },
        "loading": {
          "$ref": "common_types.json#/$defs/DynamicBoolean"
        },
        "onRowActivate": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when a row is opened (double click or Enter). The renderer attaches the row's id as `rowId`."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "columns",
        "rows"
      ]
    },
    "Banner": {
      "type": "object",
      "description": "Full-width status strip. Use for a message about the whole surface: an outage, a required update.",
      "properties": {
        "component": {
          "const": "Banner"
        },
        "tone": {
          "type": "string",
          "enum": [
            "accent",
            "danger",
            "ai",
            "warning",
            "success",
            "neutral",
            "info"
          ],
          "default": "info"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "text": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The message."
        },
        "action": {
          "$ref": "common_types.json#/$defs/ComponentId",
          "description": "A component at the end of the banner, usually a Button."
        },
        "onDismiss": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows a close button; fires when it is pressed."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "InlineAlert": {
      "type": "object",
      "description": "A tinted callout placed inside content. Use for a note or warning about the content around it.",
      "properties": {
        "component": {
          "const": "InlineAlert"
        },
        "tone": {
          "type": "string",
          "enum": [
            "accent",
            "danger",
            "ai",
            "warning",
            "success",
            "neutral",
            "info"
          ],
          "default": "warning"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "text": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The message."
        },
        "icon": {
          "description": "Icon name from the HorizonUI icon set, e.g. \"GitBranch\", \"Sparkles\", \"Check\".",
          "type": "string"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "ProgressBar": {
      "type": "object",
      "description": "Determinate or indeterminate bar. Use for the progress of one task.",
      "properties": {
        "component": {
          "const": "ProgressBar"
        },
        "value": {
          "$ref": "common_types.json#/$defs/DynamicNumber"
        },
        "max": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "default": 100
        },
        "indeterminate": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": false
        },
        "tone": {
          "type": "string",
          "enum": [
            "accent",
            "danger",
            "ai",
            "warning",
            "success",
            "ink"
          ]
        },
        "size": {
          "type": "string",
          "enum": [
            "sm",
            "md",
            "xs"
          ],
          "default": "sm"
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "showValue": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": true
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "ProgressSteps": {
      "type": "object",
      "description": "Ordered build/task steps joined by connectors. Use for the stages of a pipeline or build and where it is now.",
      "properties": {
        "component": {
          "const": "ProgressSteps"
        },
        "steps": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "error",
                      "done",
                      "active",
                      "pending"
                    ]
                  }
                },
                "required": [
                  "id",
                  "label",
                  "status"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "orientation": {
          "type": "string",
          "enum": [
            "horizontal",
            "vertical"
          ],
          "default": "horizontal"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "steps"
      ]
    },
    "EmptyState": {
      "type": "object",
      "description": "Centred placeholder for a view with nothing to show. Use when a view has nothing to show yet, with a next step.",
      "properties": {
        "component": {
          "const": "EmptyState"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "description": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "icon": {
          "description": "Icon name from the HorizonUI icon set, e.g. \"GitBranch\", \"Sparkles\", \"Check\".",
          "type": "string"
        },
        "actions": {
          "$ref": "common_types.json#/$defs/ComponentId",
          "description": "A component under the text, usually a Button."
        },
        "size": {
          "type": "string",
          "enum": [
            "sm",
            "md"
          ],
          "default": "md"
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "title"
      ]
    },
    "ErrorCard": {
      "type": "object",
      "description": "A failure summary with an expandable stack trace, Retry and Copy. Use to report a failure with its details and a retry.",
      "properties": {
        "component": {
          "const": "ErrorCard"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "message": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "stack": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "onRetry": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows a Retry button; fires when it is pressed."
        },
        "onReport": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows a Report button; fires when it is pressed."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "Accordion": {
      "type": "object",
      "description": "Stacked disclosures. Use for sections the user opens one at a time: FAQ, details, logs.",
      "properties": {
        "component": {
          "const": "Accordion"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "content": {
                "$ref": "common_types.json#/$defs/ComponentId",
                "description": "The id of the component shown when the section is open."
              },
              "icon": {
                "type": "string",
                "description": "Icon name from the HorizonUI icon set."
              },
              "meta": {
                "type": "string"
              }
            },
            "required": [
              "value",
              "title",
              "content"
            ],
            "additionalProperties": false
          }
        },
        "type": {
          "description": "`single` keeps at most one item open.",
          "type": "string",
          "enum": [
            "multiple",
            "single"
          ],
          "default": "multiple"
        },
        "variant": {
          "type": "string",
          "enum": [
            "card",
            "plain"
          ],
          "default": "plain"
        },
        "value": {
          "$ref": "common_types.json#/$defs/DynamicStringList",
          "description": "Values of the sections open at first."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "items"
      ]
    },
    "Stepper": {
      "type": "object",
      "description": "A numbered wizard. Use for a multi-step task the user walks through in order (a setup wizard).",
      "properties": {
        "component": {
          "const": "Stepper"
        },
        "steps": {
          "description": "The steps, in order.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label"
            ],
            "additionalProperties": false
          }
        },
        "current": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Index of the current step; bind it to follow the user."
        },
        "children": {
          "$ref": "common_types.json#/$defs/ChildList",
          "description": "One child per step; the current step's child shows under the steps."
        },
        "onFinish": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user finishes the last step."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "steps"
      ]
    },
    "Markdown": {
      "type": "object",
      "description": "Markdown-lite renderer, no dependencies. Use for prose answers: paragraphs, lists, tables, code fences.",
      "properties": {
        "component": {
          "const": "Markdown"
        },
        "source": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "streaming": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Marks the last block as still arriving (stream-tail fade)."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "source"
      ]
    },
    "CodeBlock": {
      "type": "object",
      "description": "A fenced code surface. Use for code the user may copy, apply or insert.",
      "properties": {
        "component": {
          "const": "CodeBlock"
        },
        "code": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "language": {
          "type": "string",
          "enum": [
            "tsx",
            "json",
            "kotlin",
            "go",
            "rust",
            "python",
            "plain",
            "typescript",
            "javascript",
            "bash",
            "diff"
          ]
        },
        "filename": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "variant": {
          "description": "\"diff\" colours lines starting with + and -.",
          "type": "string",
          "enum": [
            "diff",
            "code"
          ],
          "default": "code"
        },
        "showLineNumbers": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": false
        },
        "wrap": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": false
        },
        "maxHeight": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Pixels."
        },
        "label": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Accessible name of the scrollable code region."
        },
        "applied": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Swaps Apply for an Applied badge.",
          "default": false
        },
        "onApply": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows an Apply button; fires when it is pressed."
        },
        "onInsert": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows an Insert button; fires when it is pressed."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "code"
      ]
    },
    "ToolRun": {
      "type": "object",
      "description": "One tool call as a raised keycap row. Use to show one tool call the agent made, with its status and result.",
      "properties": {
        "component": {
          "const": "ToolRun"
        },
        "call": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "tool": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "args": {
                  "type": "object"
                },
                "result": {
                  "type": "string"
                },
                "resultKind": {
                  "type": "string",
                  "enum": [
                    "json",
                    "diff",
                    "code",
                    "text"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "error",
                    "success",
                    "pending",
                    "running",
                    "denied"
                  ]
                },
                "durationMs": {
                  "type": "number"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tool",
                "status"
              ],
              "additionalProperties": false
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "call"
      ]
    },
    "PlanChecklist": {
      "type": "object",
      "description": "A plan as a checklist. Use for the agent's plan and its progress.",
      "properties": {
        "component": {
          "const": "PlanChecklist"
        },
        "items": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/PlanItem"
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "variant": {
          "type": "string",
          "enum": [
            "list",
            "capsules"
          ],
          "default": "list"
        },
        "onToggle": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user ticks a step. The renderer attaches the step's id as `itemId`."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "items"
      ]
    },
    "PermissionPrompt": {
      "type": "object",
      "description": "The approval tray for one risky action. Use to ask the user to approve one risky action (a command, a file write) before the agent runs it.",
      "properties": {
        "component": {
          "const": "PermissionPrompt"
        },
        "action": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "command": {
                  "type": "string"
                },
                "files": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "risk": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                }
              },
              "required": [
                "tool",
                "summary"
              ],
              "additionalProperties": false
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "description": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "assistantName": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The assistant's display name in the default title and the denial note."
        },
        "decided": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The decision: \"allow-once\", \"allow-always\" or \"deny\". The renderer writes it when the user decides; bind it to read it."
        },
        "decidedNote": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The note the user added to the decision."
        },
        "onDecision": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires after the user decides; `decided` and `decidedNote` hold the answer."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "action"
      ]
    },
    "DiffReview": {
      "type": "object",
      "description": "A review surface for a multi-file change. Use to have the user review a multi-file change hunk by hunk.",
      "properties": {
        "component": {
          "const": "DiffReview"
        },
        "files": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "added": {
                    "type": "number"
                  },
                  "removed": {
                    "type": "number"
                  },
                  "hunks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "header": {
                          "type": "string",
                          "description": "The hunk header, \"@@ -a,b +c,d @@\"; its numbers start the line numbers."
                        },
                        "lines": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The hunk's lines in unified diff form, each starting with \"+\", \"-\" or a space."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "rejected"
                          ],
                          "description": "Setting it controls the hunk; leave it out to let the reviewer decide in place."
                        }
                      },
                      "required": [
                        "id",
                        "header",
                        "lines"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "path",
                  "added",
                  "removed",
                  "hunks"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "view": {
          "description": "Layout at first.",
          "type": "string",
          "enum": [
            "unified",
            "split"
          ]
        },
        "onHunkDecision": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user accepts or rejects a hunk. The renderer writes the hunk's `status` into `files` and attaches `fileIndex`, `hunkId` and `decision`."
        },
        "onAcceptAll": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows Accept all; fires after every pending hunk is accepted."
        },
        "onRejectAll": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows Reject all; fires after every pending hunk is rejected."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "files"
      ]
    },
    "DecisionCard": {
      "type": "object",
      "description": "A choice for the user to make. Use to have the user pick one of 2-4 approaches, with pros, cons and your recommendation.",
      "properties": {
        "component": {
          "const": "DecisionCard"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "pros": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "recommended": {
                "type": "boolean"
              },
              "effort": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "description"
            ],
            "additionalProperties": false
          }
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "value": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The chosen option id; bind it to read the choice."
        },
        "onConfirm": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user confirms; `value` holds the choice."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "options"
      ]
    },
    "AgentStatus": {
      "type": "object",
      "description": "The agent's live state. Use for what an agent is doing right now.",
      "properties": {
        "component": {
          "const": "AgentStatus"
        },
        "state": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "error",
                "idle",
                "done",
                "thinking",
                "acting",
                "waiting"
              ]
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "name": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "detail": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "model": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Model id, e.g. \"apollo-deep\"."
        },
        "elapsedMs": {
          "$ref": "common_types.json#/$defs/DynamicNumber"
        },
        "compact": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "A single 24px row."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "TokenUsage": {
      "type": "object",
      "description": "Spend and token totals for a period. Use for spend and token totals over a period.",
      "properties": {
        "component": {
          "const": "TokenUsage"
        },
        "input": {
          "$ref": "common_types.json#/$defs/DynamicNumber"
        },
        "output": {
          "$ref": "common_types.json#/$defs/DynamicNumber"
        },
        "cached": {
          "$ref": "common_types.json#/$defs/DynamicNumber"
        },
        "cost": {
          "$ref": "common_types.json#/$defs/DynamicNumber"
        },
        "currency": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "ISO currency code."
        },
        "budget": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Spending limit in `currency`. 0 hides the budget bar; the bar turns warning from 80%."
        },
        "period": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "history": {
          "description": "Per-day totals for the trend; empty hides it.",
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component"
      ]
    },
    "WorkflowGraph": {
      "type": "object",
      "description": "A flow diagram. Use for a pipeline or agent workflow as boxes and arrows.",
      "properties": {
        "component": {
          "const": "WorkflowGraph"
        },
        "nodes": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "trigger",
                      "agent",
                      "tool",
                      "condition",
                      "output"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "error",
                      "idle",
                      "done",
                      "running"
                    ]
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "edges": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "direction": {
          "type": "string",
          "enum": [
            "horizontal",
            "vertical"
          ],
          "default": "vertical"
        },
        "onNodeClick": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when a node is clicked. The renderer attaches the node's id as `nodeId`."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "nodes",
        "edges"
      ]
    },
    "InsightCarousel": {
      "type": "object",
      "description": "Metric cards a page at a time, with previous and next buttons, one dot per page and a \"Page N of M\" status. Use for several metric findings the user pages through.",
      "properties": {
        "component": {
          "const": "InsightCarousel"
        },
        "insights": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "delta": {
                    "type": "number"
                  },
                  "body": {
                    "type": "string"
                  },
                  "series": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "accent",
                      "ai",
                      "warning",
                      "success",
                      "neutral",
                      "danger",
                      "info"
                    ]
                  }
                },
                "required": [
                  "id",
                  "title"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "pageSize": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Cards per page.",
          "default": 3
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "insights"
      ]
    },
    "Blueprint": {
      "type": "object",
      "description": "An architecture canvas. Use to explain how a system fits together: its parts in groups, the calls and data between them, and flows the user steps through. For the live status of a pipeline use WorkflowGraph.",
      "properties": {
        "component": {
          "const": "Blueprint"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString"
        },
        "nodes": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string",
                    "description": "A short mono line under the label: a protocol, a role, a count."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "function",
                      "agent",
                      "service",
                      "stream",
                      "store",
                      "library",
                      "external"
                    ],
                    "description": "Picks the chip colour and glyph."
                  },
                  "group": {
                    "type": "string",
                    "description": "Id of the group the node sits in; none for the top level."
                  }
                },
                "required": [
                  "id",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "groups": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "parent": {
                    "type": "string",
                    "description": "Id of the enclosing group, for nested groups."
                  }
                },
                "required": [
                  "id",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "edges": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string",
                    "description": "The message, call or data on the edge; drawn as a chip on it."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "data",
                      "async",
                      "dependency"
                    ],
                    "description": "Solid for data, dashed for async, dotted for a dependency."
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "flows": {
          "description": "Walk-throughs of the diagram; the reader picks one from the flow menu and steps through it.",
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string",
                    "description": "The flow's name in the flow menu: \"Render a reply\"."
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "description": "The edge the step walks: its `from` and `to` node ids."
                        },
                        "to": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string",
                          "description": "What happens on this step, in one sentence."
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "text"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "steps"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "flow": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Id of the flow shown; bind it to follow the user's pick."
        },
        "step": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Index of the current step of the flow, from 0; bind it to follow the user."
        },
        "level": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Id of the open group, \"\" for the whole diagram; bind it to follow the user."
        },
        "onNodeClick": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when a node is clicked. The renderer attaches the node's id as `nodeId`."
        },
        "height": {
          "$ref": "common_types.json#/$defs/DynamicNumber",
          "description": "Canvas height in px.",
          "default": 420
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "title",
        "nodes",
        "edges"
      ]
    },
    "Question": {
      "type": "object",
      "description": "A question for the user. Use to ask the user one question with 2-6 answers (or several, with `multiple`), each with its gains, costs and your recommendation; the thread carries the follow-up. Prefer it to DecisionCard.",
      "properties": {
        "component": {
          "const": "Question"
        },
        "title": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The question."
        },
        "description": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "A line under the question, usually your recommendation and why."
        },
        "options": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string",
                    "description": "One line: beside the label while the row is closed, above the trade-offs once it is open."
                  },
                  "pros": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Listed under Gains when the row is open."
                  },
                  "cons": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Listed under Costs when the row is open."
                  },
                  "recommended": {
                    "type": "boolean",
                    "description": "Starred as your recommendation."
                  },
                  "effort": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  },
                  "detail": {
                    "type": "string",
                    "description": "A footnote after the effort, e.g. \"12 lines in `retry.ts`\"."
                  }
                },
                "required": [
                  "id",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "multiple": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Checkboxes: the user may pick several options.",
          "default": false
        },
        "allowOther": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Adds an Other row with a text field; picking it puts `\"other\"` in the value."
        },
        "allowMore": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "description": "Adds Tell me more, an answer that asks you to explain before the user picks; it is the value `[\"more\"]`."
        },
        "value": {
          "$ref": "common_types.json#/$defs/DynamicStringList",
          "description": "Ids of the picked options, plus \"other\" for the Other row or \"more\" for Tell me more; bind it to read the answer."
        },
        "otherText": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "The Other row's text; bind it to read it."
        },
        "status": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "\"open\", \"sending\" or \"answered\". The renderer writes \"answered\" when the user sends; write \"sending\" while you act on the answer."
        },
        "thread": {
          "description": "The conversation about the question, oldest first. The renderer appends the user's replies (author \"You\"); append yours with `agent: true`.",
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "author": {
                    "type": "string",
                    "description": "Display name: \"You\", \"Dana\", \"Reviewer\"."
                  },
                  "text": {
                    "type": "string"
                  },
                  "meta": {
                    "type": "string",
                    "description": "Muted note after the name: a role (\"author\") or a revision (\"rev 2\")."
                  },
                  "agent": {
                    "type": "boolean",
                    "description": "Written by the agent: the avatar is the AI gradient with a sparkle."
                  }
                },
                "required": [
                  "author",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "onSubmit": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user sends the answer; `value` and `otherText` hold it."
        },
        "onReply": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Shows the reply field; fires with each reply. The renderer appends it to `thread` and attaches its text as `text`."
        },
        "disabled": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": false
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "title",
        "options"
      ]
    },
    "ReviewFinding": {
      "type": "object",
      "description": "One code review finding, ready to act on. Use to present code review findings: each with its severity, the flagged lines, your reasoning and a suggested fix the user can apply, reply to or dismiss.",
      "properties": {
        "component": {
          "const": "ReviewFinding"
        },
        "findings": {
          "description": "Every finding of the review; the open one shows as a card and the rest as a list under it. The renderer writes each finding's `status` and appends the user's replies.",
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "blocker",
                      "major",
                      "minor",
                      "nit"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "file": {
                    "type": "string",
                    "description": "Path of the file, e.g. \"src/payments/retry.ts\"."
                  },
                  "line": {
                    "type": "number",
                    "description": "First flagged line."
                  },
                  "endLine": {
                    "type": "number",
                    "description": "Last flagged line, when the finding spans several."
                  },
                  "reviewer": {
                    "type": "string",
                    "description": "Who found it: \"Found by Reviewer\"."
                  },
                  "category": {
                    "type": "string",
                    "description": "The kind of problem: \"correctness\", \"security\", \"style\"."
                  },
                  "code": {
                    "type": "string",
                    "description": "Source around the flagged lines; its first line is `codeStart`."
                  },
                  "codeStart": {
                    "type": "number",
                    "description": "Line number of the first line of `code`."
                  },
                  "reasoning": {
                    "type": "string",
                    "description": "Why it is a problem and what to do; `inline code` in backticks."
                  },
                  "fix": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The suggested fix as unified diff lines, each starting with \"+\", \"-\" or a space."
                  },
                  "fixStart": {
                    "type": "number",
                    "description": "Line number of the fix's first line, on both sides."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "applying",
                      "resolved",
                      "dismissed"
                    ],
                    "description": "The finding's state; `applying` shows Apply fix busy."
                  },
                  "resolution": {
                    "type": "string",
                    "description": "Shown on a resolved or dismissed finding, e.g. \"Fixed in 3f2c1a9\"."
                  },
                  "replies": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "author": {
                          "type": "string",
                          "description": "Display name: \"You\", \"Dana\", \"Reviewer\"."
                        },
                        "text": {
                          "type": "string"
                        },
                        "meta": {
                          "type": "string",
                          "description": "Muted note after the name: a role (\"author\") or a revision (\"rev 2\")."
                        },
                        "agent": {
                          "type": "boolean",
                          "description": "Written by the agent: the avatar is the AI gradient with a sparkle."
                        }
                      },
                      "required": [
                        "author",
                        "text"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "severity",
                  "title",
                  "file",
                  "line"
                ],
                "additionalProperties": false
              }
            },
            {
              "$ref": "common_types.json#/$defs/DataBinding"
            }
          ]
        },
        "active": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "Id of the open finding; bind it to follow the user."
        },
        "applyHint": {
          "$ref": "common_types.json#/$defs/DynamicString",
          "description": "A note beside the actions, e.g. what Apply fix does."
        },
        "disabled": {
          "$ref": "common_types.json#/$defs/DynamicBoolean",
          "default": false
        },
        "onApplyFix": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user applies a finding's fix. The renderer sets its `status` to \"applying\" and attaches its id as `findingId`; set \"resolved\" when the fix is in."
        },
        "onReply": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires with each reply. The renderer appends it to the finding's `replies` and attaches `findingId` and `text`."
        },
        "onDismiss": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user dismisses a finding. The renderer sets its `status` to \"dismissed\" and attaches `findingId`."
        },
        "onReopen": {
          "$ref": "common_types.json#/$defs/Action",
          "description": "Fires when the user reopens a resolved or dismissed finding. The renderer sets its `status` to \"open\" and attaches `findingId`."
        },
        "weight": {
          "$ref": "#/$defs/Weight"
        }
      },
      "required": [
        "component",
        "findings"
      ]
    }
  },
  "functions": {
    "required": {
      "type": "object",
      "description": "Checks that the value is not null, undefined, or empty.",
      "returnType": "validationResult",
      "properties": {
        "@call": {
          "const": "required"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "description": "The value to check."
            }
          },
          "required": [
            "value"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "regex": {
      "type": "object",
      "description": "Checks that the value matches a regular expression string.",
      "returnType": "validationResult",
      "properties": {
        "@call": {
          "const": "regex"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString"
            },
            "pattern": {
              "type": "string",
              "description": "The regular expression to search for in the value. Uses the A2UI regex dialect: a portable subset of ECMAScript pattern syntax in Unicode mode with no flags. Matching is case-sensitive, '.' excludes line terminators, and '^' and '$' match only at the ends of the value. Backreferences, lookbehind, named groups and '\\p{...}' are not allowed. Patterns longer than 256 code points or that could backtrack catastrophically are rejected."
            }
          },
          "required": [
            "value",
            "pattern"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "length": {
      "type": "object",
      "description": "Checks string length constraints.",
      "returnType": "validationResult",
      "properties": {
        "@call": {
          "const": "length"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString"
            },
            "min": {
              "type": "integer",
              "minimum": 0,
              "description": "The minimum allowed length."
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "description": "The maximum allowed length."
            }
          },
          "required": [
            "value"
          ],
          "anyOf": [
            {
              "required": [
                "min"
              ]
            },
            {
              "required": [
                "max"
              ]
            }
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "numeric": {
      "type": "object",
      "description": "Checks numeric range constraints.",
      "returnType": "validationResult",
      "properties": {
        "@call": {
          "const": "numeric"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicNumber"
            },
            "min": {
              "type": "number",
              "description": "The minimum allowed value."
            },
            "max": {
              "type": "number",
              "description": "The maximum allowed value."
            }
          },
          "required": [
            "value"
          ],
          "anyOf": [
            {
              "required": [
                "min"
              ]
            },
            {
              "required": [
                "max"
              ]
            }
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "email": {
      "type": "object",
      "description": "Checks that the value is a valid email address.",
      "returnType": "validationResult",
      "properties": {
        "@call": {
          "const": "email"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString"
            }
          },
          "required": [
            "value"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "formatString": {
      "type": "object",
      "description": "Performs string interpolation of data model values and other functions in the catalog functions list and returns the resulting string. The value string can contain interpolated expressions in the `${expression}` format. Supported expression types include: JSON Pointer paths to the data model (e.g., `${/absolute/path}` or `${relative/path}`), and renderer-side function calls (e.g., `${now()}`). Function arguments must be named (e.g., `${formatDate(value:${/currentDate}, format:'MM-dd')}`). To include a literal `${` sequence, escape it as `\\${`.",
      "returnType": "string",
      "properties": {
        "@call": {
          "const": "formatString"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicString"
            }
          },
          "required": [
            "value"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "formatNumber": {
      "type": "object",
      "description": "Formats a number with the specified grouping and decimal precision.",
      "returnType": "string",
      "properties": {
        "@call": {
          "const": "formatNumber"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "The number to format."
            },
            "decimals": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "Optional. The number of decimal places to show. Defaults to 0 or 2 depending on locale."
            },
            "grouping": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Optional. If true, uses locale-specific grouping separators (e.g. '1,000'). If false, returns raw digits (e.g. '1000'). Defaults to true."
            }
          },
          "required": [
            "value"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "formatCurrency": {
      "type": "object",
      "description": "Formats a number as a currency string.",
      "returnType": "string",
      "properties": {
        "@call": {
          "const": "formatCurrency"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "The monetary amount."
            },
            "currency": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The ISO 4217 currency code (e.g., 'USD', 'EUR')."
            },
            "decimals": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "Optional. The number of decimal places to show. Defaults to 0 or 2 depending on locale."
            },
            "grouping": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "Optional. If true, uses locale-specific grouping separators (e.g. '1,000'). If false, returns raw digits (e.g. '1000'). Defaults to true."
            }
          },
          "required": [
            "currency",
            "value"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "formatDate": {
      "type": "object",
      "description": "Formats a timestamp into a string using a pattern.",
      "returnType": "string",
      "properties": {
        "@call": {
          "const": "formatDate"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicValue",
              "description": "The date to format."
            },
            "format": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "A Unicode TR35 date pattern string.\n\nToken Reference:\n- Year: 'yy' (26), 'yyyy' (2026)\n- Month: 'M' (1), 'MM' (01), 'MMM' (Jan), 'MMMM' (January)\n- Day: 'd' (1), 'dd' (01), 'E' (Tue), 'EEEE' (Tuesday)\n- Hour (12h): 'h' (1-12), 'hh' (01-12) - requires 'a' for AM/PM\n- Hour (24h): 'H' (0-23), 'HH' (00-23) - Military Time\n- Minute: 'mm' (00-59)\n- Second: 'ss' (00-59)\n- Period: 'a' (AM/PM)\n\nExamples:\n- 'MMM dd, yyyy' -> 'Jan 16, 2026'\n- 'HH:mm' -> '14:30' (Military)\n- 'h:mm a' -> '2:30 PM'\n- 'EEEE, d MMMM' -> 'Friday, 16 January'"
            }
          },
          "required": [
            "format",
            "value"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "pluralize": {
      "type": "object",
      "description": "Returns a localized string based on the Common Locale Data Repository (CLDR) plural category of the count (zero, one, two, few, many, other). Requires an 'other' fallback. For English, just use 'one' and 'other'.",
      "returnType": "string",
      "properties": {
        "@call": {
          "const": "pluralize"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "The numeric value used to determine the plural category."
            },
            "zero": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "String for the 'zero' category (e.g., 0 items)."
            },
            "one": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "String for the 'one' category (e.g., 1 item)."
            },
            "two": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "String for the 'two' category (used in Arabic, Welsh, etc.)."
            },
            "few": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "String for the 'few' category (e.g., small groups in Slavic languages)."
            },
            "many": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "String for the 'many' category (e.g., large groups in various languages)."
            },
            "other": {
              "$ref": "common_types.json#/$defs/DynamicString",
              "description": "The default/fallback string (used for general plural cases)."
            }
          },
          "required": [
            "value",
            "other"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "openUrl": {
      "type": "object",
      "description": "Opens the specified URL in a browser or handler (requires user activation). This function has no return value.",
      "returnType": "void",
      "requiresUserActivation": true,
      "properties": {
        "@call": {
          "const": "openUrl"
        },
        "args": {
          "type": "object",
          "properties": {
            "url": {
              "description": "The URL to open.",
              "oneOf": [
                {
                  "type": "string",
                  "format": "uri"
                },
                {
                  "$ref": "common_types.json#/$defs/DataBinding"
                },
                {
                  "$ref": "common_types.json#/$defs/FunctionCall"
                }
              ]
            }
          },
          "required": [
            "url"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "and": {
      "type": "object",
      "description": "Performs a logical AND operation on a list of boolean values.",
      "returnType": "boolean",
      "properties": {
        "@call": {
          "const": "and"
        },
        "args": {
          "type": "object",
          "properties": {
            "values": {
              "type": "array",
              "description": "The list of boolean values to evaluate.",
              "items": {
                "$ref": "common_types.json#/$defs/DynamicBoolean"
              },
              "minItems": 2
            }
          },
          "required": [
            "values"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "or": {
      "type": "object",
      "description": "Performs a logical OR operation on a list of boolean values.",
      "returnType": "boolean",
      "properties": {
        "@call": {
          "const": "or"
        },
        "args": {
          "type": "object",
          "properties": {
            "values": {
              "type": "array",
              "description": "The list of boolean values to evaluate.",
              "items": {
                "$ref": "common_types.json#/$defs/DynamicBoolean"
              },
              "minItems": 2
            }
          },
          "required": [
            "values"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    },
    "not": {
      "type": "object",
      "description": "Performs a logical NOT operation on a boolean value.",
      "returnType": "boolean",
      "properties": {
        "@call": {
          "const": "not"
        },
        "args": {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "common_types.json#/$defs/DynamicBoolean",
              "description": "The boolean value to negate."
            }
          },
          "required": [
            "value"
          ],
          "unevaluatedProperties": false
        }
      },
      "required": [
        "@call",
        "args"
      ]
    }
  },
  "$defs": {
    "Weight": {
      "type": "number",
      "description": "The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column."
    },
    "PlanItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "done",
            "active",
            "pending",
            "skipped",
            "failed"
          ]
        },
        "detail": {
          "type": "string"
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlanItem"
          }
        }
      },
      "required": [
        "id",
        "label",
        "status"
      ],
      "additionalProperties": false
    },
    "TreeNode": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "md",
            "folder",
            "folder-open",
            "module",
            "source-folder",
            "test-folder",
            "resources",
            "ts",
            "tsx",
            "js",
            "jsx",
            "json",
            "css",
            "html",
            "kotlin",
            "java",
            "go",
            "rust",
            "python",
            "swift",
            "yaml",
            "toml",
            "xml",
            "sql",
            "shell",
            "docker",
            "git",
            "lock",
            "image",
            "env",
            "config",
            "file"
          ]
        },
        "icon": {
          "type": "string",
          "description": "Icon name from the HorizonUI icon set."
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TreeNode"
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "none",
            "modified",
            "added",
            "deleted",
            "conflict",
            "ignored"
          ]
        },
        "meta": {
          "type": "string"
        },
        "badge": {
          "type": "string"
        },
        "disabled": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "label"
      ],
      "additionalProperties": false
    },
    "anyComponent": {
      "oneOf": [
        {
          "$ref": "#/components/Text"
        },
        {
          "$ref": "#/components/Image"
        },
        {
          "$ref": "#/components/Icon"
        },
        {
          "$ref": "#/components/Video"
        },
        {
          "$ref": "#/components/AudioPlayer"
        },
        {
          "$ref": "#/components/Row"
        },
        {
          "$ref": "#/components/Column"
        },
        {
          "$ref": "#/components/List"
        },
        {
          "$ref": "#/components/Card"
        },
        {
          "$ref": "#/components/Tabs"
        },
        {
          "$ref": "#/components/Modal"
        },
        {
          "$ref": "#/components/Divider"
        },
        {
          "$ref": "#/components/Button"
        },
        {
          "$ref": "#/components/TextField"
        },
        {
          "$ref": "#/components/CheckBox"
        },
        {
          "$ref": "#/components/ChoicePicker"
        },
        {
          "$ref": "#/components/Slider"
        },
        {
          "$ref": "#/components/DateTimeInput"
        },
        {
          "$ref": "#/components/Tray"
        },
        {
          "$ref": "#/components/IconButton"
        },
        {
          "$ref": "#/components/ButtonGroup"
        },
        {
          "$ref": "#/components/SegmentedControl"
        },
        {
          "$ref": "#/components/Link"
        },
        {
          "$ref": "#/components/FormField"
        },
        {
          "$ref": "#/components/TextArea"
        },
        {
          "$ref": "#/components/NumberField"
        },
        {
          "$ref": "#/components/RadioGroup"
        },
        {
          "$ref": "#/components/Switch"
        },
        {
          "$ref": "#/components/Select"
        },
        {
          "$ref": "#/components/TagInput"
        },
        {
          "$ref": "#/components/FileDrop"
        },
        {
          "$ref": "#/components/Badge"
        },
        {
          "$ref": "#/components/Tag"
        },
        {
          "$ref": "#/components/ResourceChip"
        },
        {
          "$ref": "#/components/Avatar"
        },
        {
          "$ref": "#/components/AvatarStack"
        },
        {
          "$ref": "#/components/StatusPill"
        },
        {
          "$ref": "#/components/DeltaPill"
        },
        {
          "$ref": "#/components/Stat"
        },
        {
          "$ref": "#/components/Sparkline"
        },
        {
          "$ref": "#/components/PropertyGrid"
        },
        {
          "$ref": "#/components/Timeline"
        },
        {
          "$ref": "#/components/Tree"
        },
        {
          "$ref": "#/components/ResourceTable"
        },
        {
          "$ref": "#/components/DataGrid"
        },
        {
          "$ref": "#/components/Banner"
        },
        {
          "$ref": "#/components/InlineAlert"
        },
        {
          "$ref": "#/components/ProgressBar"
        },
        {
          "$ref": "#/components/ProgressSteps"
        },
        {
          "$ref": "#/components/EmptyState"
        },
        {
          "$ref": "#/components/ErrorCard"
        },
        {
          "$ref": "#/components/Accordion"
        },
        {
          "$ref": "#/components/Stepper"
        },
        {
          "$ref": "#/components/Markdown"
        },
        {
          "$ref": "#/components/CodeBlock"
        },
        {
          "$ref": "#/components/ToolRun"
        },
        {
          "$ref": "#/components/PlanChecklist"
        },
        {
          "$ref": "#/components/PermissionPrompt"
        },
        {
          "$ref": "#/components/DiffReview"
        },
        {
          "$ref": "#/components/DecisionCard"
        },
        {
          "$ref": "#/components/AgentStatus"
        },
        {
          "$ref": "#/components/TokenUsage"
        },
        {
          "$ref": "#/components/WorkflowGraph"
        },
        {
          "$ref": "#/components/InsightCarousel"
        },
        {
          "$ref": "#/components/Blueprint"
        },
        {
          "$ref": "#/components/Question"
        },
        {
          "$ref": "#/components/ReviewFinding"
        }
      ]
    },
    "anyFunction": {
      "oneOf": [
        {
          "$ref": "#/functions/required"
        },
        {
          "$ref": "#/functions/regex"
        },
        {
          "$ref": "#/functions/length"
        },
        {
          "$ref": "#/functions/numeric"
        },
        {
          "$ref": "#/functions/email"
        },
        {
          "$ref": "#/functions/formatString"
        },
        {
          "$ref": "#/functions/formatNumber"
        },
        {
          "$ref": "#/functions/formatCurrency"
        },
        {
          "$ref": "#/functions/formatDate"
        },
        {
          "$ref": "#/functions/pluralize"
        },
        {
          "$ref": "#/functions/openUrl"
        },
        {
          "$ref": "#/functions/and"
        },
        {
          "$ref": "#/functions/or"
        },
        {
          "$ref": "#/functions/not"
        }
      ]
    }
  }
}
