v1.10.0 — Platform 抽象架构落地
·
317 commits
to master
since this release
🎯 核心里程碑
从 v1.9.1 → v1.10.0,按 C → A → B 三阶段路线把 Platform 抽象从"只有骨架"推到"两个平台注册 + 14 个命令走抽象"的稳定状态,为 v2.0 多平台(智联真实现)打平底盘。
七 PR 连发汇总
| PR | 内容 |
|---|---|
| #131 | Platform ABC + BossPlatform adapter 骨架 |
| #132 | --platform CLI 选项 + get_platform_instance helper |
| #133 | greet / apply 首批迁移 + Platform with 上下文 |
| #134 | ZhilianPlatform stub(抽象自证,27 契约测试) |
| #135 | batch-greet 迁移 |
| #136 | ABC 扩展 9 个 P0+ 方法 + 5 命令迁移 |
| #137 | 剩余 6 命令迁移(Week 1c 收口) |
新增能力
Platform 抽象基类(src/boss_agent_cli/platforms/)
- `Platform` ABC 定义跨平台统一契约(is_success / unwrap_data / parse_error + P0 只读 + P1 写操作 + P2 沟通 + P0+ 扩展)
- `BossPlatform` — BOSS 直聘实现,透传给底层 BossClient
- `ZhilianPlatform` — 智联招聘 stub,Week 2 替换为真实现
CLI 面
- `--platform zhipin` 全局选项(默认值),未知平台抛 click.BadParameter
- `~/.boss-agent/config.json` 支持 `"platform"` 字段持久化
- `boss schema` 输出 `current_platform` + `supported_platforms`
下游 Python 嵌入 API
```python
from boss_agent_cli import Platform, BossPlatform, ZhilianPlatform, get_platform, list_platforms
```
命令层全量迁移(14 个命令)
greet / apply / batch-greet / interviews / detail / show / me / recommend / chat / chatmsg / mark / exchange / pipeline / digest 全部走 Platform 抽象。
唯一留待独立 PR 的是 `search`(因为 run_search_pipeline 间接耦合 BossClient 签名)。
Tests & Quality
- 测试 927 → 998(+71 新增)
- mypy 严格模块 66 → 71
- mypy `--strict` 0 错误 / 80 源文件全覆盖
- 7 PR 合流全部 CI 7/7 绿
Breaking Changes
无。命令行为、信封格式、错误码枚举、CLI 接口全部向后兼容。
安装
```bash
pip install --upgrade boss-agent-cli
```
下阶段(v1.11.0 / v2.0)
- search 命令 Platform 迁移
- ZhilianPlatform 真实现(Week 2,2-3 周工期)
- awesome-agents 社区投稿(star 已过 76 门槛)
What's Changed
- docs: 新增拉勾公开接口调研作为多平台样板 by @can4hou6joeng4 in #126
- docs: 新增智联与猎聘公开接口调研 by @can4hou6joeng4 in #127
- docs: 新增桥接协议升级调研结论 by @can4hou6joeng4 in #128
- docs: 更新社区投稿真实状态与渠道约束 by @can4hou6joeng4 in #130
- feat: 新增平台抽象基类和 BOSS 直聘适配器 by @can4hou6joeng4 in #131
- feat: 新增平台选项与辅助函数 by @can4hou6joeng4 in #132
- refactor: 迁移打招呼与投递命令到平台抽象 by @can4hou6joeng4 in #133
- feat: 新增智联招聘平台自证接入 by @can4hou6joeng4 in #134
- refactor: 迁移批量打招呼命令到平台抽象 by @can4hou6joeng4 in #135
- feat: 平台抽象扩展与批量命令迁移 by @can4hou6joeng4 in #136
- refactor: 迁移沟通与漏斗命令到平台抽象 by @can4hou6joeng4 in #137
- chore: 发布版本 1.10.0 by @can4hou6joeng4 in #138
Full Changelog: v1.9.1...v1.10.0