- M2-a/b/c: stop/pause/resume/skip dept, plan/rework approval gates, budget & timeout circuit breakers, per-dept cancel and on-demand rework - tier-3: batched event persistence (_EventBuffer), project/dept concurrency semaphores, company_ws event streaming - tier-4: cross-dept deliverable handoff, CEO memory feedback loop, per-dept model override, one-click Markdown report export (RFC5987) - fix: per-department independent SQLAlchemy session in parallel waves (shared Session race across asyncio tasks in company_orchestrator) - fix: rename process_open_fds gauge to app_process_open_fds (collides with prometheus_client ProcessCollector on Linux) - fix: dept role resolution ladder, real token usage & cost tracking, deliverable file capture (mtime scan of dept workspace) - tests: test_company_orchestrator.py 22 cases with mocked LLM - frontend: CompanyControlRoom, companyExecution store, EChart, dept model config dialog, ws proxy, build/typecheck decoupling - docs: virtual company design/usage docs, M2 control plan, deepseek4pro handover docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.6 KiB
3.6 KiB
平台资料
工单平台(Gitea)
| 项目 | 值 |
|---|---|
| 平台 | Gitea 1.25.2 |
| 地址 | http://101.43.95.130:3001 |
| 用户名 | admin |
| 密码 | 123456 |
| 仓库 | admin/aiagent |
| 工单页 | http://101.43.95.130:3001/admin/aiagent/issues |
| 分支 | rjb_win_dev |
| API Token | fbc9ee7f96635793f4844187eac5c0e573480721 |
| API 文档 | http://101.43.95.130:3001/api/swagger |
项目(aiagent)
| 项目 | 值 |
|---|---|
| 名称 | 天工智能体平台 |
| 前端 | D:\aaa\aiagent\frontend (Vue 3 + Vite + Element Plus) |
| 后端 | D:\aaa\aiagent\backend (FastAPI + SQLAlchemy + Celery) |
| 前端端口 | 3001 (Vite dev) |
| 后端端口 | 8037 (Uvicorn) |
测试账号
| 项目 | 值 |
|---|---|
| 用户名 | admin |
| 密码 | 123456 |
| 角色 | 管理员 |
前端项目结构
frontend/src/
├── api/index.ts # API 封装 (axios),DEV 走 Vite 代理到 8037
├── main.ts # 入口
├── router/index.ts # 路由 (/agent-chat, /agents, /workflow 等)
├── stores/
│ ├── agent.ts # Agent Store (Pinia)
│ ├── user.ts # 用户 Store
│ └── ...
├── views/
│ ├── AgentChat.vue # Agent 对话页 (核心)
│ ├── AgentConfig.vue # Agent 配置页
│ ├── Agents.vue # Agent 列表
│ └── ...
└── components/
├── AgentChatPreview.vue # Agent 预览对话组件
└── ...
后端项目结构
backend/app/
├── main.py # FastAPI 入口
├── api/
│ ├── agent_chat.py # Agent 对话 API
│ ├── agents.py # Agent CRUD API
│ ├── auth.py # 认证 API (login/register)
│ └── ...
├── agent_runtime/
│ ├── core.py # Agent 运行时核心
│ ├── context.py # 上下文管理
│ ├── memory.py # 记忆系统
│ └── orchestrator.py # 多 Agent 编排
├── core/
│ ├── config.py # 配置
│ ├── database.py # 数据库 (MySQL)
│ └── error_handler.py # 异常处理
└── models/ # SQLAlchemy 模型
API 端点(agent-chat 相关)
| 方法 | 路径 | 说明 |
|---|---|---|
| POST | /api/v1/agent-chat/bare |
默认 Agent 对话(无配置) |
| POST | /api/v1/agent-chat/bare/stream |
默认 Agent 流式对话(SSE) |
| POST | /api/v1/agent-chat/{agent_id} |
指定 Agent 对话 |
| POST | /api/v1/agent-chat/{agent_id}/stream |
指定 Agent 流式对话(SSE) |
| POST | /api/v1/agent-chat/orchestrate |
多 Agent 编排 |
| GET | /api/v1/agents |
Agent 列表 |
| GET | /api/v1/agents/{id} |
Agent 详情 |
| POST | /api/v1/auth/login |
登录(form-encoded) |
快速验证命令
# 登录获取 token
curl -s -X POST http://localhost:8037/api/v1/auth/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'username=admin&password=123456'
# 测试 bare 对话
curl -s -X POST http://localhost:8037/api/v1/agent-chat/bare \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"message":"你好"}'
# 测试流式对话
curl -s -X POST http://localhost:8037/api/v1/agent-chat/bare/stream \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"message":"你好"}'
SSH / Git
| 项目 | 值 |
|---|---|
| SSH Clone | ssh://git@101.43.95.130:222/admin/aiagent.git |
| HTTP Clone | http://101.43.95.130:3001/admin/aiagent.git |