scorpio 972c822338 feat: complete remaining features
- SkillsPage: skill list, detail view, create new skill
- App.tsx: add Skills nav (4 tabs total)
- RoomSidebar: agent dropdown multi-select for members
- ChatView: workspace file preview modal, load message history on room open
- room.go: message history persistence to history/YYYY-MM-DD.md, auto memory update after task
- api/server.go: add createSkill, getWorkspaceFile, getMessages endpoints
- Clean up unused Vite default files
- Update plan.md with completed items and remaining tasks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 22:08:56 +08:00

103 lines
3.8 KiB
Markdown
Raw 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.

# Agent Team — 开发进度
**最后更新**: 2026-03-04
**仓库**: https://gitea.catter.cn/sdaduanbilei/agent-team.git
---
## 已完成
### Go 后端
- [x] `go.mod` 初始化依赖已锁定Go 1.20 兼容版本)
- [x] `internal/llm/client.go` — OpenAI 兼容客户端,支持 DeepSeek/Kimi/Ollama/OpenAI流式输出
- [x] `internal/agent/agent.go` — AGENT.md frontmatter 解析SOUL.md 加载memory 读写system prompt 构建
- [x] `internal/skill/skill.go` — agentskills.io 标准skill 发现/加载/XML 生成
- [x] `internal/room/room.go` — 群配置加载master orchestration 循环消息历史持久化memory 自动更新
- [x] `internal/hub/hub.go` — GitHub repo clone团队包安装
- [x] `internal/api/server.go` — Echo HTTP 服务WebSocket hub全部 REST 接口(含 skill 创建、workspace 文件预览、消息历史)
- [x] `cmd/server/main.go` — 入口
### React 前端
- [x] Vite + React + TypeScript + Tailwind v4
- [x] `web/src/types.ts` + `store.ts` — 类型定义Zustand storeWebSocket 流式消息
- [x] `App.tsx` — 四栏导航(群聊/Agents/Skills/市场)
- [x] `RoomSidebar.tsx` — 群列表实时状态创建群agent 下拉多选)
- [x] `ChatView.tsx` — 消息流右侧面板workspace 文件预览 Modal
- [x] `AgentsPage.tsx` — Monaco MD 编辑器AGENT.md/SOUL.md 编辑
- [x] `SkillsPage.tsx` — skill 列表,详情查看,新建 skill
- [x] `MarketPage.tsx` — GitHub 一键雇佣,发布说明
### 构建验证
- [x] `go build ./...` 通过
- [x] `npm run build` 通过386KB JS bundle
---
## 待完成
### 下次开始(优先级高)
- [ ] **Leader 群 orchestration** — 目前 room.go 的 Handle 只支持单 masterLeader 群需要广播给多个 master
- Leader 群:用户消息广播给所有 master每个 master 在自己的部门群里处理
- 需要在 Room 结构里区分 TypeLeaderHandle 时遍历所有 master
- [ ] **环境变量配置页** — 前端提供设置页,配置各 provider 的 API Key
- 新增 `web/src/components/SettingsPage.tsx`
- 后端 `PUT /api/config` 写入 `.env` 文件,启动时 `godotenv` 加载
- [ ] **实际测试** — 配置真实 DeepSeek API Key 跑通一次完整流程
```bash
export DEEPSEEK_API_KEY=your_key
go run cmd/server/main.go
# 另一个终端
cd web && npm run dev
```
### 后续迭代
- [ ] Skill 脚本执行沙箱scripts/ 目录下的脚本安全执行)
- [ ] 用户认证
- [ ] 消息搜索
---
## 环境要求
| 工具 | 版本 |
|------|------|
| Go | 1.20+ |
| Node.js | 18+ |
| git | 任意 |
## 启动方式
```bash
# 后端
export DEEPSEEK_API_KEY=your_key
go run cmd/server/main.go
# 前端(另一个终端)
cd web
npm install
npm run dev
# 访问 http://localhost:5173
```
## 关键设计决策(供参考)
1. **一切皆 MD** — agent 配置、soul、memory、tasks、history 全部是 MD 文件,无数据库
2. **Context 隔离** — 每个 agent 的 LLM 调用独立master 只看摘要,子 agent 只看自己的任务
3. **agentskills.io 标准** — skill 格式遵循开放标准,可复用社区 skill
4. **OpenAI 兼容接口** — 所有 provider 统一用 go-openai只改 BaseURL
5. **去中心化 Hub** — 团队包就是 GitHub repotopic `agent-team` 聚合发现
## 用户问题备忘
> "导演 agent 会不会忘记之前的内容?"
**答**:不会忘,通过两个机制保证:
1. **任务内 context**:整个 orchestration 循环分配→执行→review是同一个 `masterMsgs` 数组,导演始终看到完整对话
2. **跨任务 memory**:任务完成后经验写入 `agents/director/memory/`,下次任务时注入 system prompt
导演的 identitySOUL.md永远不变memory 会随经验积累越来越丰富。