Jobs of fixed types with strict argument schemas, signed by the Hub with Ed25519 over canonical JSON. Agent requests signed with the server's Ed25519 key. Config sealed to the server's X25519 key (X25519 + HKDF + AES-256-GCM; Node has no XSalsa20). Exports encrypted with a key that only travels in the download link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
105 lines
3.2 KiB
JSON
105 lines
3.2 KiB
JSON
{
|
|
"$id": "https://c-git.crosscode.co.za/joshua/crosscode-platform/raw/branch/main/packages/contracts/schemas/script-report.json",
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"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
|
|
},
|
|
"schema": {
|
|
"type": "string",
|
|
"const": "crosscode.script-report/1"
|
|
},
|
|
"command": {
|
|
"type": "string",
|
|
"maxLength": 40
|
|
}
|
|
},
|
|
"required": [
|
|
"status",
|
|
"startedAt",
|
|
"finishedAt",
|
|
"steps",
|
|
"schema",
|
|
"command"
|
|
]
|
|
}
|