Source snapshot: 97d7f0fae96dc04b7ddad56fc1db6a108ed662cc [SEC-CLEAN] · pre-push-clean v1.0 · 109处敏感信息已自动转乱码
1.4 KiB
1.4 KiB
🔗 HBP通信协议 v1.0 · Robot专属语言
🎯 协议概述
HBP = HoloLake Bind Protocol
用途:Robot插件的原生识别语言
功能:绑定开发者身份 + 配置同步路径
📜 绑定码格式
原始数据结构
{
"protocol": "HBP",
"version": "1.0",
"developer": {
"id": "DEV-007",
"name": "四月",
"timestamp": "2026-02-28T20:00:00Z"
},
"master": {
"notion_db_id": "xxx",
"sync_token": "encrypted_xxx"
},
"signature": "zhiqiu_xxx"
}
编码格式
HBP1.0:[Base64编码后的JSON]
示例
HBP1.0:eyJwcm90b2NvbCI6IkhCUCIsInZlcnNpb24iOiIxLjAiLC4uLn0=
🔒 安全验证
- 前缀检查:必须以
HBP1.0:开头 - Base64解码:解码后JSON
- 签名验证:检查
signature字段 - 时间戳验证:防止过期绑定码
🔄 同步协议
Robot → Notion(上报)
{
"type": "heartbeat",
"dev_id": "DEV-007",
"timestamp": "2026-02-28T20:00:00Z",
"status": "online"
}
Notion → Robot(下发)
{
"type": "config_update",
"dev_id": "DEV-007",
"data": {
"current_task": "M05用户中心",
"progress": 40,
"next_step": "环节2"
}
}
✅ 实现清单
- 绑定码生成器
- 绑定码解析器
- 签名验证机制
- Notion API集成
- 心跳保持机制