xworkmate-app/patch_app_docs.py

19 lines
758 B
Python
Raw Normal View History

import os
path = '/Users/shenlan/workspaces/cloud-neutral-toolkit/xworkmate-app/docs/architecture/xworkmate-bridge-migration.md'
with open(path, 'r') as f:
content = f.read()
protocol_section = '''
## Communication Protocol
- **Standard**: 全面转向 **JSON-RPC 2.0** 作为 APP Bridge 之间的默认通信协议
- **Client Implementation**: `GatewayAcpClient` `GatewayRuntime` 已完成健壮性升级支持自动识别 JSON-RPC 2.0 报文
- **Compatibility**: 当前处于混合过渡期Bridge 响应报文会同时包含 JSON-RPC 2.0 字段`result`/`error` Legacy 字段`ok`/`type`/`payload`确保旧版逻辑不会崩溃
'''
content += protocol_section
with open(path, 'w') as f:
f.write(content)