init
This commit is contained in:
+67
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://cognitive-agent.local/schemas/function-config.schema.json",
|
||||
"title": "FunctionConfig",
|
||||
"$defs": {
|
||||
"operation": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "capability", "target", "parameters"],
|
||||
"properties": {
|
||||
"id": {"type": "string", "pattern": "^[a-z][a-z0-9_-]{1,63}$"},
|
||||
"capability": {"type": "string", "pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$"},
|
||||
"target": {"$ref": "common.schema.json#/$defs/target"},
|
||||
"parameters": {"type": "object"},
|
||||
"motion": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["mode", "direction", "start_position_pct", "delta_position_pct"],
|
||||
"properties": {
|
||||
"mode": {"const": "relative"},
|
||||
"direction": {"type": "string", "enum": ["increase", "decrease"]},
|
||||
"start_position_pct": {"type": "integer", "minimum": 0, "maximum": 100},
|
||||
"delta_position_pct": {"type": "integer", "minimum": 0, "maximum": 100},
|
||||
"start_angle_deg": {"type": "number"},
|
||||
"delta_angle_deg": {"type": "number", "minimum": 0}
|
||||
}
|
||||
},
|
||||
"transition": {"$ref": "common.schema.json#/$defs/transition"},
|
||||
"depends_on": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {"type": "string", "pattern": "^[a-z][a-z0-9_-]{1,63}$"},
|
||||
"default": []
|
||||
},
|
||||
"timeout_ms": {"type": "integer", "minimum": 1, "maximum": 3600000},
|
||||
"failure_policy": {"$ref": "common.schema.json#/$defs/failure_policy"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["apiVersion", "kind", "metadata", "spec"],
|
||||
"properties": {
|
||||
"apiVersion": {"const": "cognitive-agent/v1alpha1"},
|
||||
"kind": {"const": "FunctionConfig"},
|
||||
"metadata": {"$ref": "common.schema.json#/$defs/metadata"},
|
||||
"spec": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["domain", "operations"],
|
||||
"properties": {
|
||||
"domain": {"type": "string", "pattern": "^[a-z][a-z0-9_]*$"},
|
||||
"operations": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 64,
|
||||
"items": {"$ref": "#/$defs/operation"}
|
||||
},
|
||||
"assumptions": {
|
||||
"type": "array",
|
||||
"items": {"type": "string", "maxLength": 500},
|
||||
"default": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user