{ "$id": "https://c-git.crosscode.co.za/joshua/crosscode-platform/raw/branch/main/packages/contracts/schemas/agent-stats.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "schema": { "type": "string", "const": "crosscode.agent-stats/1" }, "at": { "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))$" }, "ram": { "type": "object", "properties": { "totalBytes": { "type": "number", "minimum": 0 }, "usedBytes": { "type": "number", "minimum": 0 }, "availableBytes": { "type": "number", "minimum": 0 }, "swapTotalBytes": { "type": "number", "minimum": 0 }, "swapUsedBytes": { "type": "number", "minimum": 0 } }, "required": [ "totalBytes", "usedBytes", "availableBytes", "swapTotalBytes", "swapUsedBytes" ] }, "cpu": { "type": "object", "properties": { "percent": { "type": "number", "minimum": 0, "maximum": 100 }, "load1": { "type": "number", "minimum": 0 }, "load5": { "type": "number", "minimum": 0 }, "load15": { "type": "number", "minimum": 0 }, "cores": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "percent", "load1", "load5", "load15", "cores" ] }, "disks": { "maxItems": 30, "type": "array", "items": { "type": "object", "properties": { "mount": { "type": "string", "maxLength": 255 }, "totalBytes": { "type": "number", "minimum": 0 }, "usedBytes": { "type": "number", "minimum": 0 }, "freeBytes": { "type": "number", "minimum": 0 } }, "required": [ "mount", "totalBytes", "usedBytes", "freeBytes" ] } }, "uptimeSeconds": { "type": "number", "minimum": 0 }, "versions": { "type": "object", "properties": { "os": { "type": "string", "maxLength": 200 }, "node": { "type": "string", "maxLength": 40 }, "postgres": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "frpc": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ] }, "agent": { "type": "string", "maxLength": 40 } }, "required": [ "os", "node", "postgres", "frpc", "agent" ] }, "frpcRunning": { "type": [ "boolean", "null" ] }, "processes": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 100 }, "church": { "anyOf": [ { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,30}$" }, { "type": "null" } ] }, "product": { "anyOf": [ { "type": "string", "enum": [ "events", "website", "app", "accounts" ] }, { "type": "null" } ] }, "status": { "type": "string", "maxLength": 40 }, "memoryBytes": { "type": "number", "minimum": 0 }, "cpuPercent": { "type": "number", "minimum": 0 }, "restarts": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "uptimeSeconds": { "type": "number", "minimum": 0 } }, "required": [ "name", "church", "product", "status", "memoryBytes", "cpuPercent", "restarts", "uptimeSeconds" ] } }, "central": { "anyOf": [ { "type": "object", "properties": { "proxyBindAddr": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ] }, "allowPorts": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ] }, "frpsRunning": { "type": [ "boolean", "null" ] } }, "required": [ "proxyBindAddr", "allowPorts", "frpsRunning" ] }, { "type": "null" } ] }, "frpConfigPath": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ] } }, "required": [ "schema", "at", "ram", "cpu", "disks", "uptimeSeconds", "versions", "frpcRunning", "processes" ] }