- The agent finds frps/frpc's config (Hub path, systemd -c, usual places) and reads INI and TOML. - New jobs frp-read, frp-write (secrets kept on the server, verify, backup, restart, roll back) and probe-ports (which ports are free here), on central and church servers. - Stats report frpConfigPath; crosscode gets FRPC_INI on church servers. - Website plan versions move up to contracts 1.16.0 and Hub 2.12.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
143 lines
3.9 KiB
JSON
143 lines
3.9 KiB
JSON
{
|
|
"$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",
|
|
"frp-read",
|
|
"frp-write",
|
|
"probe-ports",
|
|
"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"
|
|
]
|
|
}
|