# sunlab **Repository Path**: gzcloud/sunlab ## Basic Information - **Project Name**: sunlab - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-29 - **Last Updated**: 2026-05-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Sunlab > **⚠️ 项目暂时不可使用,请等待 v0.0.1 版本发布。** **AI-Native Development Platform** — 以 AI Agent 为核心的下一代开发环境。 [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) [![CI](https://github.com/normojs/sublab/actions/workflows/ci.yml/badge.svg)](https://github.com/normojs/sublab/actions/workflows/ci.yml) [English](README.md) ## 愿景 Sunlab 不是在传统 IDE 上"加一个 AI 侧边栏",而是从零设计一个 **Agent-First** 的开发平台: AI Agent 和人类开发者使用完全相同的工具和 API,协同完成编码、调试、重构、部署。 ## 核心特性 - **微内核 + Actor 模型** — 事件驱动、服务隔离、可扩展 - **Agent-First** — AI Agent 是一等公民,与人类共享 Command 路径 - **MCP 双向** — 既是 MCP Client(调用外部工具)也是 MCP Server(暴露 IDE 能力) - **WASM 插件沙盒** — 基于 Capability 的安全模型,插件通过 Reactive Component Protocol 渲染 UI - **多部署模式** — 桌面(Tauri IPC)/ 服务器(Unix Socket Daemon + Gateway)/ 混合 - **事件溯源** — 所有状态变更通过 `Command → Event` 管线,天然支持 undo/redo 和审计 ## 技术栈 | 层 | 技术 | |---|---| | 桌面框架 | Tauri v2 | | 服务器 | Unix Socket Daemon + axum Gateway | | 后端 | Rust (Edition 2024) | | 前端 | React 19 + TypeScript + Mantine + TailwindCSS 4 | | 编辑器 | Monaco Editor | | 终端 | xterm.js | | AI 对话 | assistant-ui | | WASM 运行时 | wasmtime (Component Model) | | AI 协议 | MCP + ACP | ## 架构 ``` Frontend (React 19) │ Transport 抽象层 (自动检测环境) │ ┌────┼────────────┐ │ │ │ Tauri WebSocket Unix Socket IPC (→Gateway) (SSH tunnel) │ │ │ └────┼────────────┘ │ Rust Kernel (微内核) ├── Event Bus ├── Editor Service (LSP) ├── File System (VFS) ├── Terminal (PTY) ├── Agent Engine (MCP) └── Extension Host (WASM) ``` 详细架构文档见 [ARCHITECTURE.md](ARCHITECTURE.md)。 ## 文档 | 文档 | 内容 | |---|---| | [ARCHITECTURE.md](ARCHITECTURE.md) | 系统总览、设计原则、技术栈 | | [docs/01-core-kernel.md](docs/01-core-kernel.md) | 微内核:事件总线、命令分发、Actor 模型 | | [docs/02-agent-system.md](docs/02-agent-system.md) | Agent 架构:Model Router、MCP/ACP | | [docs/03-plugin-system.md](docs/03-plugin-system.md) | WASM 插件:Reactive Component Protocol | | [docs/04-frontend.md](docs/04-frontend.md) | 前端:Transport 抽象、状态管理、布局 | | [docs/05-project-structure.md](docs/05-project-structure.md) | 项目结构:13 个 Crate 职责、依赖图 | | [docs/06-deployment-modes.md](docs/06-deployment-modes.md) | 部署:Daemon + Gateway、Docker、systemd | ## 项目结构 ``` sunlab/ ├── crates/ │ ├── sunlab-protocol/ # 共享类型,零业务逻辑 │ ├── sunlab-core/ # 微内核 │ ├── sunlab-transport/ # 传输层 (Tauri IPC / Unix Socket / WS) │ ├── sunlab-agent/ # AI Agent 引擎 │ ├── sunlab-editor/ # 编辑器服务 │ ├── sunlab-fs/ # 文件系统服务 │ ├── sunlab-terminal/ # 终端服务 │ ├── sunlab-workspace/ # 工作区管理 │ ├── sunlab-search/ # 搜索服务 │ ├── sunlab-git/ # Git 服务 │ ├── sunlab-app/ # Tauri 桌面入口 │ ├── sunlab-server/ # Unix Socket Daemon │ └── sunlab-gateway/ # 协议网关 (HTTP/WS/TCP) ├── frontend/ # React 前端 ├── docs/ # 架构文档 └── extensions/ # WASM 插件示例 ``` ## 开发 ### 前置要求 - Rust (Edition 2024) - Node.js 22+ / pnpm - Tauri v2 CLI ### 桌面开发 ```bash cd frontend && pnpm install cargo tauri dev ``` ### 服务器构建 ```bash cargo build --release --bin sunlab-server --bin sunlab-gateway cd frontend && pnpm build ``` ## 开源协议 [Apache-2.0](LICENSE)