docs: kanban handler protocol v1 + merged API ref

This commit is contained in:
2026-06-22 10:43:08 +08:00
parent 08f04e773b
commit 20389a40ac
2 changed files with 128 additions and 37 deletions
+30 -37
View File
@@ -1,59 +1,52 @@
# Kanban HTTP API — 跨机器任务协作
所有 Agentmohe、zhiwei、xxm、xiao)通过 HTTP API 读写 kanban 任务卡片
不需要 Hermes,不需要 XMPP bot,只需要能 curl 到 `192.168.1.246:9580`
看板已合入 AgentsMeeting Dashboard5803),不再独立于 9580 端口
## 基础 URL
```
http://192.168.1.246:9580/kanban
http://192.168.1.246:5803
```
## 操作
## 浏览器查看
直接打开 `http://192.168.1.246:5803/` → 点顶栏 **📋 Kanban** tab。
支持按状态和指派者筛选。
## REST API
### 列出任务
### 查看所有任务
```bash
curl -X POST http://192.168.1.246:9580/kanban/list -H "Content-Type: application/json" -d '{}'
# 全部
curl http://192.168.1.246:5803/api/kanban
# 按状态筛选
curl "http://192.168.1.246:5803/api/kanban?status=ready"
# 按指派者筛选
curl "http://192.168.1.246:5803/api/kanban?assignee=mohe"
```
可以筛选:
返回 JSON 数组,每项含 id / title / body / status / assignee / created_at。
### 查看单个任务(含评论)
```bash
# 只看指派给自己的
curl -X POST ... -d '{"assignee":"xxm"}'
# 只看待处理
curl -X POST ... -d '{"status":"ready"}'
curl http://192.168.1.246:5803/api/kanban/t_3adcf4a6
```
### 查看单个任务
```bash
curl -X POST http://192.168.1.246:9580/kanban/show -d '{"id":"t_3adcf4a6"}'
```
返回 JSON,含 comments 数组。
### 添加评论(有问题或进展时用)
```bash
curl -X POST http://192.168.1.246:9580/kanban/comment \
-d '{"id":"t_3adcf4a6","author":"xxm","body":"这里有个问题:..."}'
```
## 创建 / 更新 / 评论
评论会发到核心群通知所有人。
### 查看评论
```bash
curl -X POST http://192.168.1.246:9580/kanban/comments -d '{"id":"t_3adcf4a6"}'
```
### 更新任务状态
```bash
curl -X POST http://192.168.1.246:9580/kanban/update \
-d '{"id":"t_3adcf4a6","status":"done"}'
```
(走 kanban handler 流程,暂不开放 HTTP 写操作)
## 沟通流程
1. 创建任务 → 核心群收到通知
2. 你有问题 → 加评论(curl comment
3. 评论被看到 → 有人回复评论
4. 完成 → 更新状态为 done
1. 创建任务 → Dashboard 事件 → XMPP DM 通知目标 agent
2. agent 在 kanban-handler session 里处理
3. 有疑问 → 评论卡片 → 触发新一轮通知
4. 完成 → 更新 status=done → 可选汇报
**不需要在群里说话。** 评论代替讨论,通知代替 @。