- Events and Accounts: Background jobs are switched on or off and rescheduled from the admin; the choice is kept in the database (job_overrides), wins over the .env and applies at once. Accounts gets an Admin -> Background jobs page and per-job env flags, as Events. - Accounts: every email styled as Cross Events' (church colour, logo, button, footer), same plain text (src/lib/emails.ts). - Contracts 1.12.0: env-read / env-set agent jobs, envReadResultSchema, isSecretEnvName. - crosscode script: `crosscode env <church> <product>` reads the .env (secrets hidden) and, with --set/--unset/--restart, changes one file, rebuilds the frontend when its file changed, reloads, and puts the file back if the site doesn't answer (lib/envedit.cjs, tests/envedit.bats). - Agent 1.3.0: runs env-read and env-set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
140 lines
3.8 KiB
JSON
140 lines
3.8 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",
|
|
"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"
|
|
]
|
|
}
|