Skip to content

v1.10.0 — Platform 抽象架构落地

Choose a tag to compare

@can4hou6joeng4 can4hou6joeng4 released this 21 Apr 04:07
· 317 commits to master since this release
a74ca50

🎯 核心里程碑

从 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

Full Changelog: v1.9.1...v1.10.0