一个面向 CodeBuddy CloudAgent 平台的独立开源控制台,基于 ACP (Agent Client Protocol) 协议与云端 Agent Runtime 对话。
Disclaimer: This project is an independent open-source demo for CodeBuddy CloudAgent's public ACP protocol. It is not an official product of CodeBuddy / WorkBuddy, and is not affiliated with nor endorsed by Tencent.
React 19 · TypeScript · Vite · TailwindCSS 4 · shadcn/ui · zustand · @tanstack/react-query · react-router v7
# 1. 安装依赖
npm install
# 2. 配置环境变量
cp .env.example .env.local
# 按需填入 VITE_EXPERT_MANIFEST_BASE / VITE_SKILLS_RELEASE_BASE
# 3. 本地开发(dev server: http://localhost:5173)
npm run dev
# 4. 构建
npm run build
前端启动后,点右上角「API Key」胶囊粘入你的 CloudAgent 个人 API Key:
去 https://www.codebuddy.cn/profile/keys 创建一把(格式 ck_xxx.yyy),每个账号可自助生成。
API Key 只存本地 localStorage,不会上传到任何服务器。
本项目只提供 UI 与协议集成,不自带专家/skill/mcp 资源。按以下方式自备:
expert_center.json 入口清单 + 对应的 md / png 文件,放到任意可 HTTPS 访问的对象存储或 CDN;把根路径写进 VITE_EXPERT_MANIFEST_BASE。清单结构见 src/features/experts/types.ts。VITE_SKILLS_RELEASE_BASE。参见 skills-release/ 里的示例结构。mcp.json。详见 src/features/mcp/catalog.ts。# 在服务器上装 Nginx 后,本地执行:
export SERVER_IP=1.2.3.4 # 你的服务器 IP
export SERVER_USER=root # 登录用户
export REMOTE_PATH=/data/app/CloudAgentDashboard
export UPSTREAM_HOST=www.codebuddy.cn # 反代的上游
bash deploy.sh
脚本会 npm run build → scp 上传 → 写 Nginx 配置 → reload。
Nginx 的 /v2/ 反代是为了绕开浏览器 CORS(CloudAgent 平台默认不对浏览器开放 CORS)。
src/ api/ REST API 客户端(runtimes / sessions / checkpoints / versions / releases / envd / experts) app/ 全局 layout / Header / ApiKeyPill features/ chat/ 对话消息模型 + 渲染组件(text / reasoning / tool-call / plan) experts/ 专家数据模型 + 召唤 / 软注入 skills/ Skill catalog + prompt 注入 mcp/ MCP catalog runtimes/ Runtime 创建弹窗 hooks/ useAcpConnection.ts ⭐ ACP 连接池(跨 React 组件生命周期保活) pages/ 页面:Overview / Runtimes / Workbench / Settings stores/ zustand:auth / chat / experts / skills / runtimes lib/ 工具:safe-json / message-storage / time
MIT