{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://aps.local/contracts/envelope.schema.json", "title": "EventEnvelope", "description": "服务端推给客户端的事件信封(协议 v1)。界面只依赖这一层,不感知引擎差异。", "$defs": { "status": { "type": "string", "enum": ["accepted", "pending-confirmation", "succeeded", "failed"] }, "envelope": { "type": "object", "required": ["v", "seq", "ts", "sessionId", "type", "data"], "properties": { "v": { "const": 1, "description": "协议版本;改协议就加版本,不改这一版" }, "seq": { "type": "integer", "minimum": 1, "description": "会话内单调递增;断点续传与去重靠它" }, "ts": { "type": "integer", "description": "发生时间,整数毫秒(ADR-0007)" }, "sessionId": { "type": "string", "minLength": 1 }, "runId": { "type": "string", "description": "一次运行(回合)的标识;同会话可先后多个 run" }, "type": { "type": "string" }, "data": { "type": "object" } }, "additionalProperties": false } } }