docs+release: MCP.md 工具参考与部署指南;0.2.0

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
chenweiandClaude committed 2026-07-30 16:59:07 +00:00
1 parent 9506490ce2
commit de683fe9c2
7 files changed
+193 -11

No files matched your search

+19
View File
@@ -1,5 +1,24 @@
# CHANGELOG
## [0.2.0] — 2026-07-30
新增 **ppclock-mcp**:跑在蓝牙物理所在机器上的单层 MCP 服务器,agent 经 stdio 或
streamable HTTP 直驱墨水屏。
### MCP 服务器
- `ppclock-mcp` 命令(`ppclock.mcp_server:main`):stdio / streamable HTTP 双模,
HTTP 绑非回环地址强制 `PPCLOCK_MCP_TOKEN` Bearer 鉴权(ASGI 中间件,不符 401)
- 13 个工具(`ppclock.mcp_tools`):scan_devices / device_status / set_time / set_mode /
toggle / upload_image(路径或 base64,6 抖动+6 调整参数)/ render_template(6 模板)/
countdown / countdown_off / calendar_text / set_sleep / clear_screen / raw_send
- 统一输出契约与 CLI `--json` 同构:`{"ok","tool","data"|"error":{"code","message","hint"?}}`,
错误码 CONNECT_TIMEOUT / DEVICE_NOT_FOUND / BLE_ERROR / INVALID_PARAM / INTERNAL
- **DeviceManager 公开为子包能力**(`ppclock.device_manager`,方案 C 连接管理):
按需连接 + 空闲保持,守候窗口覆盖设备 30-60s 广播窗口(`--connect-timeout` 默认 90s),
空闲自动断开(`--idle-timeout` 默认 300s),全操作串行,掉线重连重试一次
- 有意不暴露:OTA / 激活 / LUT / WiFi / 轮播(高危或本固件 no-op,走 SDK/CLI)
- 文档:`docs/sdk/MCP.md`(工具参考 + agent 挂载 + Windows 部署)
## [0.1.0] — 2026-07-30
首个 SDK 化发布。4.2寸墨水屏设备(DA14585 BLE,400×300 黑白红三色)的**完全离线**开发包: