agent-fleet/openspec/changes/chatops-architecture-revision/tasks.md
Zer4tul 1bc7580ecc refactor: remove Matrix bot, make agent-fleet platform-agnostic API service
- Remove src/integrations/matrix/ (bot connection, command parsing, notification formatting)
- Remove matrix-sdk dependency from Cargo.toml
- Remove MatrixConfig from config.rs and [matrix] from config.example.toml
- Add GET /api/v1/tasks (list with status/agent_id filter)
- Add POST /api/v1/tasks/{task_id}/retry (Failed/AgentLost → Assigned)
- Add EventStore::list_tasks() with parameterized query
- 29/29 tests pass

Platform integration (Telegram, Matrix, Feishu) is Agent-side responsibility.
agent-fleet is now a pure HTTP API orchestration engine.
2026-05-12 10:59:19 +08:00

22 lines
1.2 KiB
Markdown
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.

## 1. 移除 Matrix bot 和通知格式化代码
- [ ] 1.1 删除 `src/integrations/matrix/` 目录
- [ ] 1.2 从 `src/integrations/mod.rs` 移除 `pub mod matrix;`
- [ ] 1.3 从 `src/main.rs` 移除 Matrix bot 启动逻辑
- [ ] 1.4 从 `Cargo.toml` 移除 `matrix-sdk` 依赖
- [ ] 1.5 从 `config.example.toml` 移除 `[matrix]` section
- [ ] 1.6 从 `src/config.rs` 移除 `MatrixConfig` struct 及相关字段
- [ ] 1.7 删除通知格式化函数和命令解析代码(如已从 matrix 模块导出)
## 2. 新增 HTTP API 端点
- [ ] 2.1 实现 `GET /api/v1/tasks`:返回任务列表 JSON支持 `status``agent_id` 查询参数过滤
- [ ] 2.2 实现 `POST /api/v1/tasks/{task_id}/retry`:对 failed/agent_lost 任务触发重新入队,非可重试状态返回 400
- [ ] 2.3 在 EventStore 中添加 `list_tasks(status: Option<&str>, agent_id: Option<&str>)` 查询方法
- [ ] 2.4 在 `src/main.rs` 注册新路由
## 3. 测试与验证
- [ ] 3.1 `cargo check` 通过(无 matrix-sdk 依赖)
- [ ] 3.2 `cargo test` 全部通过(移除 matrix 相关测试,新增 API 端点测试)
- [ ] 3.3 新增 API 端点测试:任务列表过滤、重试成功、重试失败场景