71 lines
2.6 KiB
JSON
Executable File
71 lines
2.6 KiB
JSON
Executable File
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://cognitive-agent.local/schemas/scene-config.schema.json",
|
|
"title": "SceneConfig",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["apiVersion", "kind", "metadata", "spec"],
|
|
"properties": {
|
|
"apiVersion": {"const": "cognitive-agent/v1alpha1"},
|
|
"kind": {"const": "SceneConfig"},
|
|
"metadata": {"$ref": "common.schema.json#/$defs/metadata"},
|
|
"spec": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["function_refs", "steps", "execution"],
|
|
"properties": {
|
|
"function_refs": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "domain", "config_ref"],
|
|
"properties": {
|
|
"id": {"type": "string", "pattern": "^[a-z][a-z0-9_-]{1,63}$"},
|
|
"domain": {"type": "string", "pattern": "^[a-z][a-z0-9_]*$"},
|
|
"config_ref": {"type": "string", "minLength": 1, "format": "uri-reference"},
|
|
"sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
|
|
}
|
|
}
|
|
},
|
|
"steps": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"maxItems": 128,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "function_ref"],
|
|
"properties": {
|
|
"id": {"type": "string", "pattern": "^[a-z][a-z0-9_-]{1,63}$"},
|
|
"function_ref": {"type": "string", "pattern": "^[a-z][a-z0-9_-]{1,63}$"},
|
|
"depends_on": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": {"type": "string", "pattern": "^[a-z][a-z0-9_-]{1,63}$"},
|
|
"default": []
|
|
},
|
|
"start_offset_ms": {"type": "integer", "minimum": 0, "maximum": 3600000},
|
|
"failure_policy": {"$ref": "common.schema.json#/$defs/failure_policy"}
|
|
}
|
|
}
|
|
},
|
|
"execution": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["mode", "default_failure_policy"],
|
|
"properties": {
|
|
"mode": {"type": "string", "enum": ["sequential", "parallel", "dag"]},
|
|
"default_failure_policy": {"$ref": "common.schema.json#/$defs/failure_policy"},
|
|
"max_parallelism": {"type": "integer", "minimum": 1, "maximum": 16},
|
|
"scene_timeout_ms": {"type": "integer", "minimum": 1, "maximum": 3600000}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|