feat: a2ui interface to enablee the LLM to give structured information
This commit is contained in:
144
assets/a2ui/catalog.json
Normal file
144
assets/a2ui/catalog.json
Normal file
@@ -0,0 +1,144 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://ds4server.local/a2ui/v1_0/catalog.json",
|
||||
"title": "DS4Server A2UI Catalog",
|
||||
"catalogId": "https://ds4server.local/a2ui/v1_0/catalog.json",
|
||||
"instructions": "Use the Basic Catalog for interaction and layout. Use research components for compact analytical results.",
|
||||
"components": {
|
||||
"Text": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Text" },
|
||||
"Image": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Image" },
|
||||
"Icon": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Icon" },
|
||||
"Video": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Video" },
|
||||
"AudioPlayer": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/AudioPlayer" },
|
||||
"Divider": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Divider" },
|
||||
"Row": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Row" },
|
||||
"Column": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Column" },
|
||||
"List": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/List" },
|
||||
"Card": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Card" },
|
||||
"Modal": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Modal" },
|
||||
"Tabs": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Tabs" },
|
||||
"Button": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Button" },
|
||||
"TextField": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/TextField" },
|
||||
"CheckBox": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/CheckBox" },
|
||||
"Slider": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/Slider" },
|
||||
"DateTimeInput": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/DateTimeInput" },
|
||||
"ChoicePicker": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/components/ChoicePicker" },
|
||||
"Chart": { "$ref": "#/$defs/chart" },
|
||||
"Table": { "$ref": "#/$defs/table" },
|
||||
"Metric": { "$ref": "#/$defs/metric" },
|
||||
"Timeline": { "$ref": "#/$defs/timeline" },
|
||||
"Map": { "$ref": "#/$defs/map" },
|
||||
"MindMap": { "$ref": "#/$defs/mindMap" },
|
||||
"Form": { "$ref": "#/$defs/form" }
|
||||
},
|
||||
"functions": {
|
||||
"required": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/required" },
|
||||
"regex": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/regex" },
|
||||
"length": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/length" },
|
||||
"numeric": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/numeric" },
|
||||
"email": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/email" },
|
||||
"formatString": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/formatString" },
|
||||
"formatNumber": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/formatNumber" },
|
||||
"formatCurrency": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/formatCurrency" },
|
||||
"formatDate": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/formatDate" },
|
||||
"pluralize": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/pluralize" },
|
||||
"openUrl": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/openUrl" },
|
||||
"and": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/and" },
|
||||
"or": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/or" },
|
||||
"not": { "$ref": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json#/functions/not" }
|
||||
},
|
||||
"$defs": {
|
||||
"surfaceProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"iconUrl": { "type": "string", "format": "uri" },
|
||||
"agentDisplayName": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"researchBase": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"component": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"accessibility": { "type": "object" },
|
||||
"weight": { "type": "number" },
|
||||
"checks": { "type": "array" }
|
||||
},
|
||||
"required": ["id", "component"]
|
||||
},
|
||||
"chart": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/researchBase" },
|
||||
{ "properties": { "component": { "const": "Chart" }, "chartType": { "enum": ["bar", "line", "area", "stackedBar", "pie", "donut"] }, "series": {} }, "required": ["chartType", "series"] }
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
},
|
||||
"table": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/researchBase" },
|
||||
{ "properties": { "component": { "const": "Table" }, "columns": {}, "rows": {} }, "required": ["columns", "rows"] }
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
},
|
||||
"metric": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/researchBase" },
|
||||
{ "properties": { "component": { "const": "Metric" }, "label": {}, "value": {}, "detail": {}, "trend": {} }, "required": ["label", "value"] }
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
},
|
||||
"timeline": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/researchBase" },
|
||||
{ "properties": { "component": { "const": "Timeline" }, "events": {} }, "required": ["events"] }
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
},
|
||||
"map": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/researchBase" },
|
||||
{ "properties": { "component": { "const": "Map" }, "locations": {} }, "required": ["locations"] }
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
},
|
||||
"mindMap": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/researchBase" },
|
||||
{ "properties": { "component": { "const": "MindMap" }, "nodes": {} }, "required": ["nodes"] }
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
},
|
||||
"form": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/researchBase" },
|
||||
{ "properties": { "component": { "const": "Form" }, "children": { "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/ChildList" }, "submitLabel": { "type": "string" }, "action": { "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/Action" } }, "required": ["children"] }
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
},
|
||||
"anyComponent": {
|
||||
"oneOf": [
|
||||
{ "$ref": "#/components/Text" }, { "$ref": "#/components/Image" }, { "$ref": "#/components/Icon" },
|
||||
{ "$ref": "#/components/Video" }, { "$ref": "#/components/AudioPlayer" }, { "$ref": "#/components/Divider" },
|
||||
{ "$ref": "#/components/Row" }, { "$ref": "#/components/Column" }, { "$ref": "#/components/List" },
|
||||
{ "$ref": "#/components/Card" }, { "$ref": "#/components/Modal" }, { "$ref": "#/components/Tabs" },
|
||||
{ "$ref": "#/components/Button" }, { "$ref": "#/components/TextField" }, { "$ref": "#/components/CheckBox" },
|
||||
{ "$ref": "#/components/Slider" }, { "$ref": "#/components/DateTimeInput" }, { "$ref": "#/components/ChoicePicker" },
|
||||
{ "$ref": "#/components/Chart" }, { "$ref": "#/components/Table" }, { "$ref": "#/components/Metric" },
|
||||
{ "$ref": "#/components/Timeline" }, { "$ref": "#/components/Map" }, { "$ref": "#/components/MindMap" },
|
||||
{ "$ref": "#/components/Form" }
|
||||
],
|
||||
"discriminator": { "propertyName": "component" }
|
||||
},
|
||||
"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" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user