Files
Cognitive_Agent/contracts/schemas/execution-report.schema.json
2026-08-26 20:11:09 +08:00

50 lines
2.0 KiB
JSON
Executable File

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cognitive-agent.local/schemas/execution-report.schema.json",
"title": "ExecutionReport",
"type": "object",
"additionalProperties": false,
"required": ["apiVersion", "kind", "metadata", "spec"],
"properties": {
"apiVersion": {"const": "cognitive-agent/v1alpha1"},
"kind": {"const": "ExecutionReport"},
"metadata": {"$ref": "common.schema.json#/$defs/metadata"},
"spec": {
"type": "object",
"additionalProperties": false,
"required": ["mode", "status", "started_at", "finished_at", "results"],
"properties": {
"mode": {"type": "string", "enum": ["dry_run", "hil", "vehicle"]},
"status": {"type": "string", "enum": ["succeeded", "partially_succeeded", "failed", "cancelled"]},
"verification_status": {
"type": "string",
"enum": ["verified_success", "submitted_unverified", "failed_or_blocked"],
"description": "Highest task evidence level: feedback verified, transport submitted only, or submission blocked/failed."
},
"started_at": {"type": "string", "format": "date-time"},
"finished_at": {"type": "string", "format": "date-time"},
"physical_state": {
"type": "object",
"description": "Authoritative physical device state captured from hardware feedback."
},
"results": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["ref", "domain", "status"],
"properties": {
"ref": {"type": "string", "minLength": 1},
"domain": {"type": "string", "pattern": "^[a-z][a-z0-9_]*$"},
"status": {"type": "string", "enum": ["succeeded", "failed", "skipped", "compensated"]},
"message": {"type": "string", "maxLength": 1000},
"telemetry": {"type": "object"}
}
}
}
}
}
}
}