内容
# S-Loop
> 人工智能桌面工作台 — 聊天、代理编排、定时任务、桌面宠物,全部在一个 Tauri 2 应用中
<p align="center">
<img src="public/home.png" alt="S-Loop Screenshot" width="800" />
</p>
<p align="center">
<a href="https://github.com/JeffGuo7/s-loop/actions/workflows/ci.yml"><img src="https://github.com/JeffGuo7/s-loop/actions/workflows/ci.yml/badge.svg" alt="持续集成"></a>
<a href="https://github.com/JeffGuo7/s-loop/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="许可证"></a>
<a href="https://github.com/JeffGuo7/s-loop/releases"><img src="https://img.shields.io/github/v/release/JeffGuo7/s-loop?include_prereleases&label=发布版本" alt="发布版本"></a>
<a href="https://github.com/JeffGuo7/s-loop/stargazers"><img src="https://img.shields.io/github/stars/JeffGuo7/s-loop?style=flat&logo=github" alt="星标"></a>
<a href="https://github.com/JeffGuo7/s-loop/releases/latest"><img src="https://img.shields.io/badge/下载-Windows%20.exe-blue?logo=windows" alt="下载 Windows"></a>
<a href="https://github.com/JeffGuo7/s-loop/releases/latest"><img src="https://img.shields.io/github/downloads/JeffGuo7/s-loop/total?color=blue" alt="下载量"></a>
</p>
[中文文档](README.zh-CN.md)
## 快速开始
### 开发
```bash
git clone https://github.com/JeffGuo7/s-loop.git
cd s-loop
npm install
npm run tauri:dev
```
> 前置条件:Node.js ≥ 18,Rust ≥ 1.85(MSVC),npm
### 下载(Windows)
从 [发布页面](https://github.com/JeffGuo7/s-loop/releases/latest) 下载最新的安装程序。
| 格式 | 文件 |
|--------|------|
| 安装程序(推荐) | `S-Loop_<版本>_x64-setup.exe` |
| 便携版 | `S-Loop_<版本>_x64_zh-CN.msi` |
## 功能
| 模块 | 描述 |
|--------|-------------|
| **AI 聊天** | 流式 SSE 输出,推理可视化,工具调用日志,Markdown + 语法高亮,Mermaid / LaTeX |
| **代理构建器** | 自定义代理(指令 / 模型 / 技能 / MCP / 权限),斜杠命令,拖拽组装 |
| **MCP 服务器** | stdio MCP 进程管理,自动工具发现,Rust 管理的生命周期 |
| **技能** | 本地 SKILL.md 扫描,远程从 ClawHub 安装,CLI 集成,ZIP 拖拽 |
| **定时任务** | Cron / 间隔 / 一次性,绑定代理 + 技能,交付到聊天或平台 |
| **平台中心** | Telegram(双向同步),电子邮件,Webhook,飞书,钉钉,企业微信,Slack,Discord,QQ 机器人 |
| **桌面宠物** | SVG 动画宠物,透明叠加窗口,多状态,主题包 |
| **网页搜索** | Bing / Brave / SearXNG / Tavily / Exa — 5 引擎,零配置默认 |
| **主题** | 9 种色彩调色板 × 暗色/亮色,玻璃拟态,CSS 变量驱动 |
## 技术栈
| 层 | 技术栈 |
|-------|-------|
| 桌面 | Tauri 2 |
| 前端 | React 19 + TypeScript + Vite |
| 样式 | Tailwind CSS 4 + HeroUI v3 |
| 状态 | Zustand |
| 动画 | Framer Motion |
| 图标 | Lucide React |
| 语法 | Shiki |
| AI 引擎 | `@earendil-works/pi-agent-core` + `pi-ai` + `pi-coding-agent` |
| AI 运行时 | pi-server(Node.js 子进程,HTTP + SSE) |
| 数据库 | SQLite(tauri-plugin-sql) |
| 国际化 | i18next(英语 / 中文) |
## 架构
```
┌─ Tauri 2 ───────────────────────────────────────────────────┐
│ │
│ Rust 后端 Node.js AI 引擎 │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ pi_server.rs │◄──────►│ pi-server(HTTP + SSE) │ │
│ │ mcp_manager.rs │ │ 代理会话 │ │
│ │ commands.rs │ │ 委托任务 / 子代理 │ │
│ │ skill_installer │ │ 目标循环执行器 │ │
│ │ skills_cli.rs │ │ 任务调度器(cron) │ │
│ │ system_tray │ │ 平台中心(hub) │ │
│ │ │ │ telegram-monitor │ │
│ └──────────────────┘ └──────────────────────────┘ │
│ │
│ React 前端 │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ ChatView │ AgentBuilder │ TasksPage │ PetPage │ │
│ │ SettingsModal │ FileTree │ WorkspacePanel │ Sidebar │ │
│ │ MCP │ Skills │ Platforms │ WebSearch │ i18n │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────┘
```
## 许可证
MIT