Prompt-only projection rules allowed historical samples to be appended to the current axis. Enforce typed comparison semantics at presentation and report publication, preserving historical read contracts and returning actionable validation errors.
706 lines
20 KiB
JSON
706 lines
20 KiB
JSON
{
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "locate_features"
|
|
},
|
|
"layer": {
|
|
"type": "string",
|
|
"enum": [
|
|
"junctions",
|
|
"pipes",
|
|
"valves",
|
|
"pumps",
|
|
"tanks",
|
|
"reservoirs",
|
|
"scada"
|
|
]
|
|
},
|
|
"feature_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 100
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"layer",
|
|
"feature_ids"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "zoom_to_map"
|
|
},
|
|
"center": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"maxItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "number",
|
|
"minimum": -180,
|
|
"maximum": 180
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": -90,
|
|
"maximum": 90
|
|
}
|
|
]
|
|
},
|
|
"zoom": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 24
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"center",
|
|
"zoom"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "render_scada_analysis"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"device_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"level": {
|
|
"type": "string",
|
|
"enum": [
|
|
"high",
|
|
"medium",
|
|
"low",
|
|
"unrated"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"device_id",
|
|
"level"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 100
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"items"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "clear_scada_analysis"
|
|
}
|
|
},
|
|
"required": [
|
|
"action"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "highlight_features"
|
|
},
|
|
"layer": {
|
|
"type": "string",
|
|
"enum": [
|
|
"junctions",
|
|
"pipes",
|
|
"valves",
|
|
"pumps",
|
|
"tanks",
|
|
"reservoirs",
|
|
"scada"
|
|
]
|
|
},
|
|
"feature_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 100
|
|
},
|
|
"effect": {
|
|
"type": "string",
|
|
"enum": [
|
|
"steady",
|
|
"pulse"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"layer",
|
|
"feature_ids",
|
|
"effect"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "clear_highlights"
|
|
}
|
|
},
|
|
"required": [
|
|
"action"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "open_chart"
|
|
},
|
|
"chart_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"chart": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"maxLength": 200
|
|
},
|
|
"chart_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"line",
|
|
"bar",
|
|
"time_comparison"
|
|
]
|
|
},
|
|
"x_axis_name": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"y_axis_name": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"x_data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 100
|
|
},
|
|
"series": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"line",
|
|
"bar",
|
|
"scatter"
|
|
]
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 100
|
|
},
|
|
"sample_times": {
|
|
"type": "array",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"format": "date-time",
|
|
"pattern": "^(?:[1-9][0-9]{3}|0[1-9][0-9]{2}|00[1-9][0-9]|000[1-9])-[0-9]{2}-[0-9]{2}T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 100
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"data"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 8
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"chart_type",
|
|
"x_data",
|
|
"series"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"evidence_refs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"minItems": 0,
|
|
"maxItems": 100
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"chart_id",
|
|
"chart",
|
|
"evidence_refs"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "close_chart"
|
|
},
|
|
"chart_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"chart_id"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "set_overlay"
|
|
},
|
|
"overlay_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 200
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"geometry",
|
|
"heatmap"
|
|
]
|
|
},
|
|
"evidence_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "FeatureCollection"
|
|
},
|
|
"features": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "Feature"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "number"
|
|
}
|
|
]
|
|
},
|
|
"properties": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"geometry": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "Point"
|
|
},
|
|
"coordinates": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "number",
|
|
"minimum": -180,
|
|
"maximum": 180
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": -90,
|
|
"maximum": 90
|
|
}
|
|
],
|
|
"additionalItems": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"coordinates"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "MultiPoint"
|
|
},
|
|
"coordinates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "number",
|
|
"minimum": -180,
|
|
"maximum": 180
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": -90,
|
|
"maximum": 90
|
|
}
|
|
],
|
|
"additionalItems": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 20000
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"coordinates"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "LineString"
|
|
},
|
|
"coordinates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "number",
|
|
"minimum": -180,
|
|
"maximum": 180
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": -90,
|
|
"maximum": 90
|
|
}
|
|
],
|
|
"additionalItems": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 20000
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"coordinates"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "MultiLineString"
|
|
},
|
|
"coordinates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "number",
|
|
"minimum": -180,
|
|
"maximum": 180
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": -90,
|
|
"maximum": 90
|
|
}
|
|
],
|
|
"additionalItems": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 20000
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 20000
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"coordinates"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "Polygon"
|
|
},
|
|
"coordinates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "number",
|
|
"minimum": -180,
|
|
"maximum": 180
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": -90,
|
|
"maximum": 90
|
|
}
|
|
],
|
|
"additionalItems": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"minItems": 4,
|
|
"maxItems": 20000
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 20000
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"coordinates"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"const": "MultiPolygon"
|
|
},
|
|
"coordinates": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "number",
|
|
"minimum": -180,
|
|
"maximum": 180
|
|
},
|
|
{
|
|
"type": "number",
|
|
"minimum": -90,
|
|
"maximum": 90
|
|
}
|
|
],
|
|
"additionalItems": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"minItems": 4,
|
|
"maxItems": 20000
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 20000
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 20000
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"coordinates"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"properties",
|
|
"geometry"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1,
|
|
"maxItems": 1000
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"features"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"overlay_id",
|
|
"title",
|
|
"mode",
|
|
"evidence_id",
|
|
"data"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"const": "clear_overlay"
|
|
},
|
|
"overlay_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
}
|
|
},
|
|
"required": [
|
|
"action",
|
|
"overlay_id"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
],
|
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
}
|