Files
pikasTech-HWLAB/protocol/schemas/common.json
T
2026-05-21 14:27:53 +00:00

86 lines
2.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hwlab.pikastech.local/protocol/schemas/common.json",
"title": "HWLAB Common Schema Definitions",
"type": "object",
"$defs": {
"id": {
"type": "string",
"minLength": 3,
"maxLength": 128,
"pattern": "^[a-z][a-z0-9]*_[A-Za-z0-9._:-]+$"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"environment": {
"type": "string",
"enum": ["dev"]
},
"serviceId": {
"type": "string",
"enum": [
"hwlab-cloud-api",
"hwlab-cloud-web",
"hwlab-agent-mgr",
"hwlab-agent-worker",
"hwlab-gateway",
"hwlab-gateway-simu",
"hwlab-box-simu",
"hwlab-patch-panel",
"hwlab-router",
"hwlab-tunnel-client",
"hwlab-edge-proxy",
"hwlab-cli",
"hwlab-agent-skills"
]
},
"lifecycleStatus": {
"type": "string",
"enum": ["pending", "active", "inactive", "failed", "deleted"]
},
"resourceState": {
"type": "string",
"enum": ["available", "reserved", "running", "maintenance", "offline"]
},
"operationStatus": {
"type": "string",
"enum": [
"requested",
"accepted",
"queued",
"running",
"succeeded",
"failed",
"rejected",
"canceled",
"timed_out"
]
},
"actorType": {
"type": "string",
"enum": ["user", "service", "agent", "worker", "system"]
},
"auditOutcome": {
"type": "string",
"enum": ["accepted", "succeeded", "failed", "rejected", "canceled"]
},
"traceLevel": {
"type": "string",
"enum": ["debug", "info", "warn", "error"]
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string",
"maxLength": 256
}
},
"jsonObject": {
"type": "object",
"additionalProperties": true
}
}
}