{
  "$id": "https://www.ai-dc.ai/developer/schemas/aidc-ui.schema.json",
  "title": "AIDC UI 规格 v1.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "aidcUi": {
      "type": "string",
      "pattern": "^1(\\.\\d+)?$"
    },
    "title": {
      "type": "string",
      "maxLength": 80
    },
    "description": {
      "type": "string",
      "maxLength": 240
    },
    "surface": {
      "type": "string",
      "enum": [
        "page",
        "card"
      ]
    },
    "locale": {
      "type": "string",
      "maxLength": 20
    },
    "body": {
      "maxItems": 40,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema0"
      }
    },
    "fallbackText": {
      "type": "string",
      "maxLength": 400
    }
  },
  "required": [
    "aidcUi",
    "body"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "PageHeader"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": {
              "type": "string",
              "maxLength": 240
            },
            "actions": {
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                  },
                  "payload": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "href": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "secondary",
                      "ghost",
                      "danger"
                    ]
                  }
                },
                "required": [
                  "label"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "title"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Stats"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "maxLength": 12
                  },
                  "delta": {
                    "type": "string",
                    "maxLength": 24
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "good",
                      "bad",
                      "neutral"
                    ]
                  },
                  "hint": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "trend": {
                    "maxItems": 240,
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  }
                },
                "required": [
                  "label",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Grid"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "columns": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 2
                },
                {
                  "type": "number",
                  "const": 3
                },
                {
                  "type": "number",
                  "const": 4
                }
              ]
            },
            "children": {
              "minItems": 1,
              "maxItems": 12,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "required": [
            "type",
            "children"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Card"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "description": {
              "type": "string",
              "maxLength": 240
            },
            "action": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "name": {
                  "type": "string",
                  "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                },
                "payload": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "href": {
                  "type": "string",
                  "maxLength": 2000
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary",
                    "ghost",
                    "danger"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            },
            "raised": {
              "type": "boolean"
            },
            "badge": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 30
                },
                "tone": {
                  "type": "string",
                  "enum": [
                    "neutral",
                    "good",
                    "bad",
                    "signal",
                    "warning"
                  ]
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": false
            },
            "children": {
              "maxItems": 24,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "required": [
            "type",
            "children"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Text"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            },
            "tone": {
              "type": "string",
              "enum": [
                "default",
                "muted"
              ]
            },
            "size": {
              "type": "string",
              "enum": [
                "sm",
                "md",
                "lg"
              ]
            }
          },
          "required": [
            "type",
            "text"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "List"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "maxItems": 500,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "subtitle": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "who": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "person",
                          "agent"
                        ]
                      },
                      "initials": {
                        "type": "string",
                        "maxLength": 2
                      },
                      "detail": {
                        "type": "string",
                        "maxLength": 160
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "meta": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "badge": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 30
                      },
                      "tone": {
                        "type": "string",
                        "enum": [
                          "neutral",
                          "good",
                          "bad",
                          "signal",
                          "warning"
                        ]
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  },
                  "actions": {
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "name": {
                          "type": "string",
                          "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                        },
                        "payload": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "href": {
                          "type": "string",
                          "maxLength": 2000
                        },
                        "style": {
                          "type": "string",
                          "enum": [
                            "primary",
                            "secondary",
                            "ghost",
                            "danger"
                          ]
                        }
                      },
                      "required": [
                        "label"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            },
            "inset": {
              "type": "boolean"
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Table"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "columns": {
              "minItems": 1,
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "align": {
                    "type": "string",
                    "enum": [
                      "left",
                      "right"
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "badge",
                      "who"
                    ]
                  }
                },
                "required": [
                  "key",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "rows": {
              "maxItems": 500,
              "type": "array",
              "items": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 400
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 30
                        },
                        "tone": {
                          "type": "string",
                          "enum": [
                            "neutral",
                            "good",
                            "bad",
                            "signal",
                            "warning"
                          ]
                        }
                      },
                      "required": [
                        "text"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "person",
                            "agent"
                          ]
                        },
                        "initials": {
                          "type": "string",
                          "maxLength": 2
                        },
                        "detail": {
                          "type": "string",
                          "maxLength": 160
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            },
            "footer": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 400
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 30
                      },
                      "tone": {
                        "type": "string",
                        "enum": [
                          "neutral",
                          "good",
                          "bad",
                          "signal",
                          "warning"
                        ]
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "person",
                          "agent"
                        ]
                      },
                      "initials": {
                        "type": "string",
                        "maxLength": 2
                      },
                      "detail": {
                        "type": "string",
                        "maxLength": 160
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "caption": {
              "type": "string",
              "maxLength": 240
            }
          },
          "required": [
            "type",
            "columns",
            "rows"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Chart"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "kind": {
              "type": "string",
              "enum": [
                "bar",
                "line",
                "area",
                "donut",
                "radar"
              ]
            },
            "labels": {
              "minItems": 1,
              "maxItems": 240,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 24
              }
            },
            "series": {
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "values": {
                    "maxItems": 240,
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "good",
                      "warning",
                      "bad"
                    ]
                  }
                },
                "required": [
                  "name",
                  "values"
                ],
                "additionalProperties": false
              }
            },
            "unit": {
              "type": "string",
              "maxLength": 12
            },
            "highlight": {
              "type": "integer",
              "minimum": -1,
              "maximum": 9007199254740991
            },
            "summary": {
              "type": "string",
              "maxLength": 240
            },
            "limits": {
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number"
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 24
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "warning",
                      "bad"
                    ]
                  }
                },
                "required": [
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "stacked": {
              "type": "boolean"
            },
            "tones": {
              "maxItems": 240,
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "good",
                      "warning",
                      "bad"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "required": [
            "type",
            "kind",
            "labels",
            "series"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Heatmap"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "columns": {
              "minItems": 1,
              "maxItems": 31,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 24
              }
            },
            "rows": {
              "minItems": 1,
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "cells": {
                    "maxItems": 31,
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "maxLength": 8
                            },
                            "tone": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "good",
                                    "warning",
                                    "bad"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "title": {
                              "type": "string",
                              "maxLength": 240
                            },
                            "level": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "const": 0
                                },
                                {
                                  "type": "number",
                                  "const": 1
                                },
                                {
                                  "type": "number",
                                  "const": 2
                                },
                                {
                                  "type": "number",
                                  "const": 3
                                }
                              ]
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      },
                      {
                        "type": "number",
                        "const": 5
                      },
                      {
                        "type": "string",
                        "const": "ink"
                      },
                      {
                        "type": "string",
                        "const": "muted"
                      }
                    ]
                  }
                },
                "required": [
                  "label",
                  "cells"
                ],
                "additionalProperties": false
              }
            },
            "summary": {
              "type": "string",
              "maxLength": 240
            }
          },
          "required": [
            "type",
            "columns",
            "rows"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Timeline"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "maxItems": 500,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "time": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "detail": {
                    "type": "string",
                    "maxLength": 240
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "neutral",
                      "good",
                      "bad",
                      "signal",
                      "warning"
                    ]
                  },
                  "who": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "person",
                          "agent"
                        ]
                      },
                      "initials": {
                        "type": "string",
                        "maxLength": 2
                      },
                      "detail": {
                        "type": "string",
                        "maxLength": 160
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "time",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Kanban"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "columns": {
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "items": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "subtitle": {
                          "type": "string",
                          "maxLength": 160
                        },
                        "who": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 60
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "person",
                                "agent"
                              ]
                            },
                            "initials": {
                              "type": "string",
                              "maxLength": 2
                            },
                            "detail": {
                              "type": "string",
                              "maxLength": 160
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "badge": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 30
                            },
                            "tone": {
                              "type": "string",
                              "enum": [
                                "neutral",
                                "good",
                                "bad",
                                "signal",
                                "warning"
                              ]
                            }
                          },
                          "required": [
                            "text"
                          ],
                          "additionalProperties": false
                        },
                        "meta": {
                          "type": "string",
                          "maxLength": 40
                        }
                      },
                      "required": [
                        "title"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "title",
                  "items"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "columns"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "KeyValue"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "minItems": 1,
              "maxItems": 40,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 400
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "required": [
                  "label",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Progress"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "label": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            },
            "value": {
              "type": "number"
            },
            "max": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "tone": {
              "type": "string",
              "enum": [
                "neutral",
                "good",
                "bad",
                "signal",
                "warning"
              ]
            },
            "meta": {
              "type": "string",
              "maxLength": 40
            },
            "ring": {
              "type": "boolean"
            }
          },
          "required": [
            "type",
            "label",
            "value"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Alert"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "tone": {
              "type": "string",
              "enum": [
                "info",
                "success",
                "warning",
                "danger"
              ]
            },
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "description": {
              "type": "string",
              "maxLength": 400
            },
            "action": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "name": {
                  "type": "string",
                  "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                },
                "payload": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "href": {
                  "type": "string",
                  "maxLength": 2000
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary",
                    "ghost",
                    "danger"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "title"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Empty"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": {
              "type": "string",
              "maxLength": 240
            },
            "action": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "name": {
                  "type": "string",
                  "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                },
                "payload": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "href": {
                  "type": "string",
                  "maxLength": 2000
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary",
                    "ghost",
                    "danger"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "title"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Buttons"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "minItems": 1,
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                  },
                  "payload": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "href": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "secondary",
                      "ghost",
                      "danger"
                    ]
                  }
                },
                "required": [
                  "label"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Chips"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "name": {
              "type": "string",
              "pattern": "^[A-Za-z][\\w.-]{0,79}$"
            },
            "options": {
              "minItems": 1,
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "count": {
                    "type": "number"
                  }
                },
                "required": [
                  "value",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "value": {
              "type": "string",
              "maxLength": 80
            }
          },
          "required": [
            "type",
            "name",
            "options"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Form"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "name": {
              "type": "string",
              "pattern": "^[A-Za-z][\\w.-]{0,79}$"
            },
            "fields": {
              "minItems": 1,
              "maxItems": 40,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z][\\w-]{0,39}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "email",
                      "select",
                      "textarea",
                      "switch"
                    ]
                  },
                  "placeholder": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "options": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        }
                      },
                      "required": [
                        "value",
                        "label"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 400
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "submit": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "name": {
                  "type": "string",
                  "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                },
                "payload": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "href": {
                  "type": "string",
                  "maxLength": 2000
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary",
                    "ghost",
                    "danger"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            },
            "cancel": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "name": {
                  "type": "string",
                  "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                },
                "payload": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "href": {
                  "type": "string",
                  "maxLength": 2000
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary",
                    "ghost",
                    "danger"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "name",
            "fields",
            "submit"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Message"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "role": {
              "type": "string",
              "enum": [
                "user",
                "agent"
              ]
            },
            "name": {
              "type": "string",
              "maxLength": 40
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            },
            "pending": {
              "type": "boolean"
            }
          },
          "required": [
            "type",
            "role"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Proposal"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "summary": {
              "type": "string",
              "maxLength": 400
            },
            "items": {
              "maxItems": 12,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 400
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "required": [
                  "label",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "confirm": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "name": {
                  "type": "string",
                  "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                },
                "payload": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "href": {
                  "type": "string",
                  "maxLength": 2000
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary",
                    "ghost",
                    "danger"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            },
            "cancel": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "name": {
                  "type": "string",
                  "pattern": "^[A-Za-z][\\w.-]{0,79}$"
                },
                "payload": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "href": {
                  "type": "string",
                  "maxLength": 2000
                },
                "style": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "secondary",
                    "ghost",
                    "danger"
                  ]
                }
              },
              "required": [
                "label"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "kind",
            "title",
            "confirm"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "AskBar"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "name": {
              "type": "string",
              "pattern": "^[A-Za-z][\\w.-]{0,79}$"
            },
            "placeholder": {
              "type": "string",
              "maxLength": 80
            },
            "voice": {
              "type": "boolean"
            }
          },
          "required": [
            "type",
            "name"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Divider"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Diagram"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "summary": {
              "type": "string",
              "maxLength": 240
            },
            "groups": {
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "sub": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "col": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                  },
                  "row": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                  },
                  "cols": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8
                  },
                  "rows": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8
                  }
                },
                "required": [
                  "label",
                  "col",
                  "row"
                ],
                "additionalProperties": false
              }
            },
            "nodes": {
              "minItems": 1,
              "maxItems": 40,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[\\w.-]{1,40}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "sub": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "meters": {
                    "maxItems": 6,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 30
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "max": {
                          "type": "number",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "label",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "lines": {
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 60
                    }
                  },
                  "col": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                  },
                  "row": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                  },
                  "cols": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8
                  },
                  "rows": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "neutral",
                      "signal",
                      "muted"
                    ]
                  },
                  "on": {
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[\\w.-]{1,40}$"
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "col",
                  "row"
                ],
                "additionalProperties": false
              }
            },
            "edges": {
              "maxItems": 80,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "to": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "dashed": {
                    "type": "boolean"
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "neutral",
                      "signal"
                    ]
                  },
                  "via": {
                    "type": "string",
                    "enum": [
                      "left",
                      "right"
                    ]
                  },
                  "on": {
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[\\w.-]{1,40}$"
                    }
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            },
            "paths": {
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[\\w.-]{1,40}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "steps": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "detail": {
                          "type": "string",
                          "maxLength": 120
                        }
                      },
                      "required": [
                        "title"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "label"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "nodes"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Estimate"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "inputs": {
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z][\\w-]{0,39}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  },
                  "step": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "value": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "maxLength": 8
                  }
                },
                "required": [
                  "name",
                  "label",
                  "min",
                  "max",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "lines": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "price": {
                    "type": "number"
                  },
                  "per": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "qty": {
                    "type": "number"
                  }
                },
                "required": [
                  "label",
                  "price"
                ],
                "additionalProperties": false
              }
            },
            "unit": {
              "type": "string",
              "maxLength": 4
            },
            "period": {
              "type": "string",
              "maxLength": 12
            },
            "note": {
              "type": "string",
              "maxLength": 240
            }
          },
          "required": [
            "type",
            "inputs",
            "lines"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Tiles"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      },
                      {
                        "type": "number",
                        "const": 5
                      },
                      {
                        "type": "string",
                        "const": "ink"
                      },
                      {
                        "type": "string",
                        "const": "muted"
                      }
                    ]
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Tags"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "minItems": 1,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      },
                      {
                        "type": "number",
                        "const": 5
                      },
                      {
                        "type": "string",
                        "const": "ink"
                      },
                      {
                        "type": "string",
                        "const": "muted"
                      }
                    ]
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Wheel"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "summary": {
              "type": "string",
              "maxLength": 240
            },
            "center": {
              "type": "string",
              "maxLength": 8
            },
            "hint": {
              "type": "string",
              "maxLength": 10
            },
            "legend": {
              "type": "string",
              "maxLength": 40
            },
            "groups": {
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[\\w.-]{1,40}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 12
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      },
                      {
                        "type": "number",
                        "const": 5
                      },
                      {
                        "type": "string",
                        "const": "ink"
                      },
                      {
                        "type": "string",
                        "const": "muted"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "items": {
              "minItems": 2,
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[\\w.-]{1,40}$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "group": {
                    "type": "string",
                    "pattern": "^[\\w.-]{1,40}$"
                  },
                  "core": {
                    "type": "boolean"
                  },
                  "summary": {
                    "type": "string",
                    "maxLength": 240
                  },
                  "points": {
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    }
                  },
                  "tags": {
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 30
                    }
                  }
                },
                "required": [
                  "id",
                  "label",
                  "group"
                ],
                "additionalProperties": false
              }
            },
            "selected": {
              "type": "string",
              "pattern": "^[\\w.-]{1,40}$"
            }
          },
          "required": [
            "type",
            "groups",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Stairs"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "color": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 1
                },
                {
                  "type": "number",
                  "const": 2
                },
                {
                  "type": "number",
                  "const": 3
                },
                {
                  "type": "number",
                  "const": 4
                },
                {
                  "type": "number",
                  "const": 5
                },
                {
                  "type": "string",
                  "const": "ink"
                },
                {
                  "type": "string",
                  "const": "muted"
                }
              ]
            },
            "items": {
              "minItems": 2,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 16
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 60
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Steps"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "minItems": 2,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "icon": {
                    "type": "string",
                    "enum": [
                      "collect",
                      "check",
                      "chart",
                      "calendar",
                      "up",
                      "flag"
                    ]
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      },
                      {
                        "type": "number",
                        "const": 5
                      },
                      {
                        "type": "string",
                        "const": "ink"
                      },
                      {
                        "type": "string",
                        "const": "muted"
                      }
                    ]
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Chain"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "items": {
              "minItems": 2,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "number",
                        "const": 2
                      },
                      {
                        "type": "number",
                        "const": 3
                      },
                      {
                        "type": "number",
                        "const": 4
                      },
                      {
                        "type": "number",
                        "const": 5
                      },
                      {
                        "type": "string",
                        "const": "ink"
                      },
                      {
                        "type": "string",
                        "const": "muted"
                      }
                    ]
                  },
                  "core": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            },
            "links": {
              "maxItems": 4,
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "back": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          },
          "required": [
            "type",
            "items"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Roadmap"
            },
            "id": {
              "type": "string",
              "pattern": "^[\\w.-]{1,64}$"
            },
            "stops": {
              "minItems": 2,
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4
              }
            },
            "legs": {
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "goals": {
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "color": {
                          "anyOf": [
                            {
                              "type": "number",
                              "const": 1
                            },
                            {
                              "type": "number",
                              "const": 2
                            },
                            {
                              "type": "number",
                              "const": 3
                            },
                            {
                              "type": "number",
                              "const": 4
                            },
                            {
                              "type": "number",
                              "const": 5
                            },
                            {
                              "type": "string",
                              "const": "ink"
                            },
                            {
                              "type": "string",
                              "const": "muted"
                            }
                          ]
                        }
                      },
                      "required": [
                        "text"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "title",
                  "goals"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "type",
            "stops",
            "legs"
          ],
          "additionalProperties": false
        }
      ]
    }
  }
}
