- 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.
1.2 KiB
1.2 KiB
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移除MatrixConfigstruct 及相关字段 - 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 端点测试:任务列表过滤、重试成功、重试失败场景