 chenweiandClaude
|
eb229717c7
|
docs: PROGRESS 记录 ppclock-mcp 0.2.0 与 Windows 实测
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-31 00:06:44 +00:00 |
|
 chenweiandClaude
|
e8feb2d34a
|
docs: MCP.md 校准 + spec 实测与终审偏离记录
- 工具表:scan_devices 返回形状 data.devices=[{name,address,rssi}];
device_status 注明触发连接守候且刷新空闲计时(周期轮询阻止 idle 断开)
- 启动参数表新增 --allowed-hosts;Windows 部署段同步(含 421 说明)
- 连接行为节:重连覆盖面改为传输层异常全家
- spec 末尾加「实测与终审偏离记录」:5 码契约(DEVICE_DISCONNECTED 未 emit)、
mac 解析顺序修正(启动 --mac > 自动扫描记住,工具面无 mac 参数)、
异常面适配、熠管家 Windows 实测结论与 421 修复
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 23:56:01 +00:00 |
|
 chenweiandClaude
|
4819715c4d
|
test: dev extra 补 pytest-asyncio,防新环境 async 测试假绿
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 23:55:59 +00:00 |
|
 chenweiandClaude
|
69c4d209c0
|
fix(mcp): HTTP 模式新增 --allowed-hosts,修 LAN Host 421
Windows 实测:绑 0.0.0.0 后局域网请求被 mcp DNS 重绑定防护 421 拒。
- parse_args 加 --allowed-hosts(逗号分隔 Host 白名单,默认 None 保持
mcp 仅 localhost 族行为)
- build_server(manager, allowed_hosts=...) 经 TransportSecuritySettings
传入(mcp 1.29.0 API 与设计一致,无需调整)
- main() 逗号拆分(去空白、丢空段)
- 回归测试:TestClient 驱动真实 ASGI app(含 lifespan),
Host=192.168.61.35:8972 initialize → 200;Host=evil.example.com → 421
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 23:55:57 +00:00 |
|
 chenweiandClaude
|
1f78587bbd
|
fix(mcp): 异常面适配真实 bleak——重试/错误码映射覆盖异常全家
- C1: _run_with_retry 捕获面 TransportError → (base+local 两个 TransportError,
BleakError, OSError, asyncio.TimeoutError);真实掉线 bleak 裸抛
BleakError("Not connected") 不再绕过重连重试
- C2/I1a: _map_transport_error 接受异常全家,类型优先(asyncio.TimeoutError、
BleakDeviceNotFoundError → CONNECT_TIMEOUT)再按中英文消息映射;_call /
scan_devices / device_status 的 except 同步扩展,device_status 不再把传输层
错误兜底成 INTERNAL
- I2: _ensure_connected 的 __aenter__ 半途失败补 __aexit__,防半开连接泄漏
- M1: status() 先算 idle_seconds 再 _touch(),读数不再被自身归零
- docstring 校准:scan_devices 返回形状 data.devices;device_status 注明
触发连接守候且刷新空闲计时
- 新测试 8 个(先红后绿):raw BleakError 重连成功/耗尽上抛、aenter 清理、
idle_seconds 语义、local 中文 TransportError 两条映射、raw BleakError 映射、
device_status 传输错误映射
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 23:55:31 +00:00 |
|
 chenweiandClaude
|
16dbf494c9
|
docs: Windows 部署执行清单(熠管家协作)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 23:19:02 +00:00 |
|
 chenweiandClaude
|
de683fe9c2
|
docs+release: MCP.md 工具参考与部署指南;0.2.0
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 16:59:07 +00:00 |
|
chenwei
|
9506490ce2
|
feat(mcp): ppclock-mcp 入口——stdio/HTTP 双模 + token 鉴权 + 非回环守卫
|
2026-07-30 16:39:13 +00:00 |
|
 chenweiandClaude
|
bb3dbcb06a
|
fix(mcp): decode_image_source 非图片输入 OSError 归一 ValueError,守 INVALID_PARAM 契约
评审 fix round 1:Image.open 两处(路径/base64 分支)包 try/except OSError,
合法 base64 或存在文件但非可识别图片时不再让 PIL.UnidentifiedImageError
逃逸出 upload_image 炸 MCP 会话;补 decode 层与工具层覆盖测试各一。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 16:29:44 +00:00 |
|
 chenweiandClaude
|
22402a508d
|
feat(mcp): 13 个高层 MCP 工具 + 图源解码 + 统一输出契约
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 16:19:52 +00:00 |
|
chenwei
|
b280977869
|
feat(mcp): DeviceManager——按需连接+空闲保持+串行锁+掉线重连(方案 C)
|
2026-07-30 15:53:50 +00:00 |
|
 chenweiandClaude
|
6b8436ebd8
|
docs: ppclock-mcp 实施计划(5 任务,TDD)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 15:48:26 +00:00 |
|
 chenweiandClaude
|
10897ec97f
|
docs: ppclock-mcp 设计 spec(单层 MCP 服务器,方案 C 连接管理,13 工具)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-30 15:37:32 +00:00 |
|