{ "$id": "https://c-git.crosscode.co.za/joshua/crosscode-platform/raw/branch/main/packages/contracts/schemas/agent-report.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.agent-report/1" }, "jobId": { "type": "string", "pattern": "^job_[A-Za-z0-9_-]{8,64}$" }, "serverId": { "type": "string", "pattern": "^srv_[A-Za-z0-9_-]{8,64}$" }, "type": { "type": "string", "enum": [ "install", "add-product", "deploy", "adopt", "adopt-undo", "restart", "seed-demo", "env-read", "env-set", "export", "uninstall", "purge", "update-agent", "check-ports", "status" ] }, "status": { "type": "string", "enum": [ "succeeded", "failed", "rolled-back", "refused", "expired" ] }, "startedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "finishedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "steps": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 200 }, "startedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "finishedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "outcome": { "type": "string", "enum": [ "ok", "failed", "skipped", "rolled-back" ] }, "detail": { "type": "string", "maxLength": 2000 } }, "required": [ "name", "startedAt", "finishedAt", "outcome" ] } }, "result": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "message": { "type": "string", "maxLength": 2000 }, "log": { "maxItems": 200, "type": "array", "items": { "type": "string", "maxLength": 1000 } } }, "required": [ "schema", "jobId", "serverId", "type", "status", "startedAt", "finishedAt", "steps", "log" ] }