WechatOnCloud/bridge/woc_bridge/__init__.py
Kris 102b98adea refactor: 完成项目包结构重构与基础模块搭建
本次提交将woc-bridge项目重构为模块化包结构,按职责拆分多个子域:
1. 新增models层定义所有Pydantic数据模型与统一错误体系
2. 拆分db/ui/messaging/routes等业务域模块
3. 实现基础API路由:状态查询、截图、登录、媒体获取等
4. 重构tools脚本的模块导入路径
5. 补充版本号与能力清单定义
6. 完善全局配置与依赖管理

整体完成项目从单文件脚本到可维护的包结构迁移,为后续功能开发打下基础。
2026-07-08 23:25:58 +08:00

16 lines
641 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""woc-bridge 主包。
bridge 1.8.0 起拆分为包结构,按职责分子包:
- models/ Pydantic schema 与错误码
- db/ SQLCipher 解密 / DB 读取 / 密钥缓存 / 密钥提取 / DB 状态协调
- ui/ xdotool/xclip UI 自动化 / 二维码截图
- messaging/ 发送队列 / SSE 消息流
- routes/ FastAPI APIRouter 按业务域分组
- app.py FastAPI 实例 + lifespan + 异常处理器 + 中间件
- config.py BridgeConfig / AppState / InitState / _init_state
- version.py 版本号与能力清单
入口仍是 bridge/server.py薄壳s6 run 脚本与 Dockerfile COPY 路径
不需改动。
"""