oclaw/interfaces/ws/protocol_schemas/hello_ok.json
oliver 4a23b715a2 重构仓库目录为统一的 runtime 分层并清理历史 openclaw 残留。
本次迁移将网关/通道/工具/技能/脚本与协议资源集中到新结构,统一路径常量与脚本转发机制,减少顶层噪音并保证运行与测试行为一致。

Made-with: Cursor
2026-04-25 01:24:23 +08:00

86 lines
3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "oclaw://schemas/hello_ok.json",
"title": "HelloOk",
"type": "object",
"additionalProperties": false,
"required": ["type", "protocol", "server", "features", "snapshot", "policy"],
"properties": {
"type": { "const": "hello-ok" },
"protocol": { "type": "integer", "minimum": 1 },
"server": {
"type": "object",
"additionalProperties": false,
"required": ["version", "connId"],
"properties": {
"version": { "type": "string", "minLength": 1 },
"connId": { "type": "string", "minLength": 1 }
}
},
"features": {
"type": "object",
"additionalProperties": false,
"required": ["methods", "events"],
"properties": {
"methods": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"events": { "type": "array", "items": { "type": "string", "minLength": 1 } }
}
},
"snapshot": {
"type": "object",
"additionalProperties": false,
"required": ["presence", "health", "stateVersion", "uptimeMs"],
"properties": {
"presence": { "type": "array", "items": { "type": "object" } },
"health": {},
"stateVersion": {
"type": "object",
"additionalProperties": false,
"required": ["presence", "health"],
"properties": {
"presence": { "type": "integer", "minimum": 0 },
"health": { "type": "integer", "minimum": 0 }
}
},
"uptimeMs": { "type": "integer", "minimum": 0 }
}
},
"policy": {
"type": "object",
"additionalProperties": false,
"required": ["maxPayload", "maxBufferedBytes", "tickIntervalMs"],
"properties": {
"maxPayload": { "type": "integer", "minimum": 1 },
"maxBufferedBytes": { "type": "integer", "minimum": 1 },
"tickIntervalMs": { "type": "integer", "minimum": 1 }
}
},
"canvasHostUrl": { "type": "string", "minLength": 1 },
"auth": {
"type": "object",
"additionalProperties": false,
"required": ["role", "scopes"],
"properties": {
"deviceToken": { "type": "string", "minLength": 1 },
"role": { "type": "string", "minLength": 1 },
"scopes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"issuedAtMs": { "type": "integer", "minimum": 0 },
"deviceTokens": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["deviceToken", "role", "scopes", "issuedAtMs"],
"properties": {
"deviceToken": { "type": "string", "minLength": 1 },
"role": { "type": "string", "minLength": 1 },
"scopes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
"issuedAtMs": { "type": "integer", "minimum": 0 }
}
}
}
}
}
}
}