[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-114635":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},114635,"Nexus","ysunyang4\u002FNexus","ysunyang4","Connect web AI assistants to local files, terminals, Git, and desktop tools through MCP, with user-controlled permissions.",null,"TypeScript",499,89,71,3,0,184,380,50,81.86,"GNU Affero General Public License v3.0",false,"main",true,[],"2026-11-22 09:40:44","2026-11-23 15:52:39","# Nexus\n\n\u003Cp align=\"center\">\n  \u003Cb>Dedicated Local AI Control Plane for ChatGPT, DeepSeek & Modern Web AI Assistants\u003C\u002Fb>\u003Cbr>\n  \u003Ci>Powered by the LocalBridge 332 Canonical MCP Tool Architecture & Durable Action Ledger\u003C\u002Fi>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#english\">\u003Cb>English\u003C\u002Fb>\u003C\u002Fa> | \u003Ca href=\"#简体中文\">\u003Cb>简体中文\u003C\u002Fb>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Ftag\u002Fv1.3.1\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-1.3.1-blue.svg\" alt=\"Version 1.3.1\">\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMCP_Tools-332_Canonical-success.svg\" alt=\"332 MCP Tools\">\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-AGPL--3.0-red.svg\" alt=\"License AGPL-3.0\">\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-Windows%20%7C%20macOS%20%7C%20Linux-brightgreen.svg\" alt=\"Platforms\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftests-190%2B_suites_%7C_1200%2B_tests-purple.svg\" alt=\"Tests\">\n\u003C\u002Fp>\n\n本项目由 [LINUX DO](https:\u002F\u002Flinux.do) 社区认可。\n\n---\n\n\u003Ca name=\"english\">\u003C\u002Fa>\n## English\n\n### 1. Overview\n\n**Nexus** is an enterprise-grade Local AI Control Plane designed specifically for ChatGPT, DeepSeek, and modern AI coding assistants. It securely bridges remote LLMs to your local workstation through a high-performance **Secure MCP Tunnel** (Streamable HTTP with Bearer token authentication).\n\nNexus allows AI agents to inspect, edit, build, debug, and orchestrate complex local engineering workflows within strictly enforced sandbox boundaries—without exposing your full filesystem or transmitting proprietary code to untrusted cloud intermediaries.\n\n```text\n ChatGPT \u002F DeepSeek \u002F Web AI Assistants\n               │\n               │ Secure MCP Tunnel (Streamable HTTP, Bearer lb_xxx)\n               ▼\n┌────────────────────────────────────────────────────────────────────────┐\n│                   Nexus Desktop Control Center (Tauri 2)               │\n│                                                                        │\n│  Fastify MCP & REST API Server (Port 18080)   SQLite Persistence (WAL) │\n└──────────────────────────────────┬─────────────────────────────────────┘\n                                   │ Bidirectional JSON-RPC 2.0 (WebSocket)\n                                   ▼\n┌────────────────────────────────────────────────────────────────────────┐\n│                   Nexus Local Runner Daemon                            │\n│                                                                        │\n│  ├── 332 Canonical MCP Tools Across 24 Capabilities                    │\n│  ├── Action Ledger WAL (Crash Recovery & Idempotent Replay)            │\n│  ├── Native Windows Computer Use (WinRT OCR, UI Automation)            │\n│  ├── Sandboxed Workspaces & Managed Git Worktrees                      │\n│  ├── Persistent Development Runtimes & Windows Job Objects             │\n│  ├── Language Server Protocol (LSP - TypeScript \u002F Python)              │\n│  ├── Headless & Interactive Browser Automation Engine                  │\n│  └── Local Intelligence Store (Memory, Rules, Knowledge, Prompts)      │\n└────────────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n### 2. Core Capabilities & Architectural Highlights\n\n#### 1. 332 Canonical MCP Tools\n- **Single Source of Truth**: All 332 tools are formally defined in `@localbridge\u002Fprotocol`, with strict input schemas, risk ratings, and automated evidence tracking.\n- **Zero Hallucination Guarantee**: Covers 24 capability dimensions: Filesystem, Advanced FS, Git Operations, Command Execution, Persistent Background Jobs, LSP Code Intelligence, Managed Worktrees, Browser Automation, Windows Computer Use, Vision Analysis, Document Engineering, Local Intelligence (Memory\u002FRules\u002FKnowledge), Agent Orchestration, and System Discovery.\n\n#### 2. ACID-Compliant Action Ledger WAL\n- **Write-Ahead Logging**: Every critical tool execution is recorded in a write-ahead log (`.wal`) prior to side-effect application.\n- **Crash Recovery & State Replay**: Automatically recovers pending operations and restores consistent workspace states after host reboot or runner crashes.\n- **Idempotency Guard**: Eliminates duplicate execution and resource waste during intermittent network reconnections.\n\n#### 3. Native Windows Computer Use & Vision\n- **Semantic UI Locating**: Combines WinRT Native OCR and UI Accessibility trees to locate screen elements without relying on fragile pixel coordinates.\n- **Multi-Monitor Control**: Window switching, foregrounding, mouse tracking, drag-and-drop, and keystroke dispatching with non-bypassable human takeover controls.\n- **Visual Validation**: Screenshot capture, image comparison, and difference inspection for automated UI testing.\n\n#### 4. Durable Execution & Process Isolation\n- **Windows Job Objects**: Enforces hard process hierarchy isolation, CPU quotas, and memory caps on spawned commands.\n- **Terminal Daemon (node-pty)**: Stateful pseudo-terminal sessions with ANSI log streaming and exit code tracking.\n- **Command Risk Engine**: AST-based command classification (`SAFE`, `CAUTION`, `DANGEROUS`) that blocks destructive system calls (`rm -rf \u002F`, `format`, `reg delete`) by default.\n\n#### 5. Local Intelligence Store\n- **Vectorless & Vector Hybrid**: SQLite-backed fast exact-match and semantic retrieval for persistent project memory, team rules, knowledge documentation, and custom prompt templates.\n- **Context Compactor**: Automatic token reduction and conversational compaction for extended multi-turn agent tasks.\n- **Extensible Skills Engine**: Declarative deterministic workflows with dynamic candidate proposal, automated validation, and live hot-reloading.\n\n#### 6. Multi-Tier Path Sandbox & Enterprise Security\n- **Physical Canonical Containment**: Enforces containment inside authorized project roots via `fs.realpathSync.native` to eliminate directory traversal (`..\u002F`) and prefix-confusion attacks.\n- **Symlink & Junction Escape Shield**: Blocks malicious symlinks and Windows NTFS directory junctions pointing outside project boundaries.\n- **Dual Token Cryptographic Isolation**: MCP client tokens (`lb_...`) and Runner daemon tokens (`lbr_...`) are generated with 256-bit entropy and stored exclusively as SHA-256 hashes. Timing side-channel attacks are mitigated via `crypto.timingSafeEqual`.\n- **Sensitive File Shield**: Automatically masks `.env*`, `*.pem`, `*.key`, `id_rsa`, `.git`, and cloud credentials.\n\n---\n\n### 3. Monorepo Project Layout\n\n```text\nNexus\u002F\n├── apps\u002F\n│   ├── desktop\u002F          # Tauri 2 + React + Vite Desktop Control Center\n│   ├── runner\u002F           # Local execution daemon (332 tools, Action Ledger, Computer Use)\n│   ├── server\u002F           # Fastify MCP Server with SQLite WAL persistence & REST API\n│   └── bridge\u002F           # Standalone Nexus MCP Bridge (Streamable HTTP \u002F ChatGPT \u002F DeepSeek)\n├── packages\u002F\n│   ├── protocol\u002F         # Pure protocol types, 332 Canonical tool definitions, RPC schemas\n│   ├── security\u002F         # Sandboxing, path verification, and command risk engine\n│   └── shared\u002F           # Structured logger (Pino), config loader, crypto utilities\n├── tests\u002F                # Comprehensive test suites (190+ suites, 1200+ tests)\n├── docs\u002F                 # Architectural specifications, security models, and guides\n├── artifacts\u002F            # Production truth evidence, capability matrices, and audit ledgers\n└── scripts\u002F              # Build automation, bundling tools, and release scripts\n```\n\n---\n\n### 4. Quick Start\n\n#### Option A: Desktop Installer (when a verified build is available)\n1. Open the [v1.3.1 release page](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Ftag\u002Fv1.3.1) and check the **Assets** section for available downloads and their exact file names. The source tag and later `main` documentation updates may not contain the same changes.\n2. Download only an asset actually listed for your platform. Verify any published checksum or signature before running it. **Do not assume a Windows, macOS, Linux or userscript asset exists unless it appears on the release page.**\n3. If no verified installer is listed, use the source-build steps below instead. Builds from the historical `v1.3.1` tag and from `main` may differ.\n\n#### Option B: Build & Run from Source\nPrerequisites: **Node.js >= 24**, **pnpm >= 10**, **Rust stable**.\n\n```powershell\n# 1. Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus.git\ncd Nexus\n\n# 2. Install workspace dependencies\npnpm install\n\n# Optional: create an untracked, machine-local configuration file.\n# The application also has built-in defaults if config.json is absent.\n# PowerShell: Copy-Item config.example.json config.json\n\n# 3. Build core packages and applications\npnpm run build\n\n# 4. Launch Desktop Control Center\npnpm --filter @localbridge\u002Fdesktop dev\n```\n\n---\n\n### 5. Connecting AI Clients\n\n#### Step 1: Authorize a Local Project\n1. Open Nexus Desktop Control Center.\n2. Under **Workspace -> Projects**, click **Authorize Project** and select your directory (e.g., `D:\\projects\\my-app`).\n3. Set **Access Mode** (`read-only` or `read-write`) and **Execution Mode** (`disabled`, `safe-only`, or `project-code`)—both can be dynamically switched at any time without restarting.\n\n#### Step 2: Generate an MCP Client Token\n1. Go to **Settings -> Tokens**.\n2. Click **Generate Token**, choose `MCP Client Token` (`lb_...`), and copy the displayed token.\n\n#### Step 3: Configure Your AI Client\n\n**ChatGPT \u002F Custom GPT Actions**:\nAdd the Streamable HTTP endpoint:\n```text\nhttp:\u002F\u002F127.0.0.1:18080\u002Fmcp\n```\nHeader: `Authorization: Bearer lb_your_token_here`\n\n**Standard MCP Client Configuration (`mcp_config.json` \u002F Client Settings)**:\n```json\n{\n  \"mcpServers\": {\n    \"nexus\": {\n      \"url\": \"http:\u002F\u002F127.0.0.1:18080\u002Fmcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer lb_your_token_here\",\n        \"MCP-Protocol-Version\": \"2024-11-05\"\n      }\n    }\n  }\n}\n```\n\n**Cursor \u002F Windsurf \u002F Any MCP Client**:\n- Transport: `Streamable HTTP`\n- URL: `http:\u002F\u002F127.0.0.1:18080\u002Fmcp`\n- Headers: `{\"Authorization\": \"Bearer lb_your_token_here\"}`\n\n---\n\n### 6. Development & Quality Verification\n\n```powershell\n# Typecheck across all 7 workspace packages (0 errors)\npnpm run typecheck\n\n# Build all packages, bundles, and Tauri resources\npnpm run build\n\n# Run the test suite\npnpm run test\n\n# Run Rust desktop check\ncargo check --manifest-path apps\u002Fdesktop\u002Fsrc-tauri\u002FCargo.toml\n```\n\n---\n\n### 7. License, Anti-Rebranding & Security Disclaimer\n\n- **Software license ([GNU AGPL-3.0](LICENSE))**: Nexus v1.3.1 is distributed under the GNU Affero General Public License v3.0 (AGPL-3.0-only), which permits personal **and commercial** use, modification and redistribution subject to its terms.\n  - **When source obligations apply**: Distributing covered works (including modified binaries), and allowing users to interact over a network with a modified version, can trigger the license's corresponding-source and notice requirements. Private modifications not conveyed or offered as a modified network service are not automatically required to be publicly published. Refer to the actual [AGPL-3.0 license](LICENSE), especially Sections 4–6 and 13, for the precise scope.\n  - **Attribution and accurate origin**: Preserve copyright, license and other legal notices as the AGPL requires, indicate relevant changes, and do not falsely represent modified builds as official releases. The AGPL's termination and reinstatement provisions are governed by Section 8; this README does not add an automatic-termination rule.\n  - **Branding**: The software license does not automatically grant trademark rights or permission to imply official endorsement. See [Brand Guidelines](BRAND_GUIDELINES.md). These guidelines do not override AGPL-granted software freedoms.\n  - **Third-party notices**: See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for dependencies and a separate architecture-reference acknowledgement.\n- **Security & Unrestricted Mode Disclaimer ([SECURITY.md](SECURITY.md))**:\n  - By default, Nexus enforces strict path sandboxing (`read-only`) and AST command risk filtering (`safe-only`).\n  - If you explicitly enable `read-write`, `project-code`, Computer Use UI automation, or **Unrestricted \u002F Full-Control Mode**, you assume full responsibility for all commands executed and files modified by connected AI models. Always back up critical work or use Git version control.\n\n---\n\n\u003Ca name=\"简体中文\">\u003C\u002Fa>\n## 简体中文\n\n### 1. 项目概述\n\n**Nexus** 是一套专为 ChatGPT、DeepSeek 及新一代 AI 编程智能体量身打造的企业级**本地 AI 控制中枢（Local AI Control Plane）**。它通过高性能**安全 MCP 隧道**（基于 Streamable HTTP 传输及 Bearer 令牌认证），将远端大模型安全连接至开发者的本地工作站。\n\nNexus 赋予 AI 智能体在严格沙箱边界内检索、编辑、构建、测试与编排完整研发工作流的能力，从根本上杜绝整盘泄露风险，且绝不将私有源码转传给任何不可信第三方云端中继。\n\n```text\n ChatGPT \u002F DeepSeek \u002F Web AI Assistants 客户端\n               │\n               │ 安全 MCP 隧道 (Streamable HTTP, Bearer lb_xxx)\n               ▼\n┌────────────────────────────────────────────────────────────────────────┐\n│                   Nexus 桌面控制中心 (Tauri 2 + React)                 │\n│                                                                        │\n│  Fastify MCP & REST 核心服务 (Port 18080)    SQLite 持久化引擎 (WAL)   │\n└──────────────────────────────────┬─────────────────────────────────────┘\n                                   │ 双向强类型 JSON-RPC 2.0 (WebSocket)\n                                   ▼\n┌────────────────────────────────────────────────────────────────────────┐\n│                   Nexus 本地执行守护进程 (Runner Daemon)               │\n│                                                                        │\n│  ├── 332 项规范 MCP 工具 (覆盖 24 类工程与智能能力)                    │\n│  ├── Action Ledger 事务日志 (WAL 崩溃恢复与幂等安全跳过)               │\n│  ├── 原生 Windows Computer Use (WinRT OCR, UI 自动化定位)              │\n│  ├── 沙箱隔离工作区与 Git Managed Worktree (独立分支隔离开发)          │\n│  ├── 长稳持久开发运行时 (Persistent Runtime & Windows Job Object)       │\n│  ├── 语言服务器协议 (LSP - TypeScript \u002F Python 代码智能)               │\n│  ├── 无头及交互式浏览器自动化引擎 (Deep Research 深度调研)             │\n│  └── 本地智能知识中枢 (记忆库、全局规则、知识库、提示词库)             │\n└────────────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n### 2. 核心技术支柱与特性\n\n#### 1. 332 项规范 MCP 工具（Canonical Tools）\n- **唯一真值源定义**：全量 332 项工具统一定义于 `@localbridge\u002Fprotocol`，具备严格的 Zod Schema 校验、权限分级和执行证据链。\n- **全方位工程覆盖**：涵盖文件系统、高级文件操作、Git 版本控制、命令安全执行、后台长稳作业、LSP 代码智能、Worktree 隔离、浏览器自动化、Windows 桌面控制（Computer Use）、图像视觉分析、多格式文档处理、本地记忆知识库、任务规划编排与系统环境发现等 24 个维度。\n\n#### 2. ACID 级 Action Ledger 事务账本\n- **预写式日志（WAL）**：所有对文件系统或外部状态产生副作用的操作均在预写日志落盘后执行。\n- **崩溃自动恢复与重放**：守护进程异常终止或系统断电重启后，系统能够检测未提交事务并实现一致性回滚或安全重试。\n- **幂等性防护机制**：自动识别重复指令，防止在弱网重连时造成重复执行。\n\n#### 3. 原生 Windows Computer Use 桌面接管与视觉感知\n- **语义级 UI 定位**：深度融合 WinRT 原生 OCR 与 Windows UI 辅助功能树（Accessibility Tree），摆脱脆弱的绝对像素坐标定位。\n- **完整人机交互**：窗口激活与置顶、鼠标平滑移动、拖拽交互、键盘按键派发，配备桌面一键紧急熔断机制。\n- **视觉对比与判定**：支持截屏捕获、图像差异比对，为桌面自动化操作提供真实反馈。\n\n#### 4. 长稳执行与企业级进程隔离\n- **Windows Job Object 隔离**：子进程与作业严格挂载至 Windows 作业对象，精确限制 CPU 配额与内存上限，防止僵尸进程驻留。\n- **全状态终端会话（node-pty）**：提供原生伪终端会话，支持 ANSI 实时日志流式推送与退出码追踪。\n- **AST 语法级命令风控**：将命令划分为 `SAFE`（安全）、`CAUTION`（注意）、`DANGEROUS`（危险）三级，默认拦截 `rm -rf \u002F`、`format`、`reg delete` 等破坏性指令。\n\n#### 5. 本地智能知识中枢（Local Intelligence Store）\n- **混合检索能力**：基于 SQLite 构建持久化记忆库、工程规则库、技术知识库与提示词模板，支持超低延迟精确检索。\n- **上下文压缩器（Context Compactor）**：智能识别关键实体与上下文摘要，在多轮高负荷对话下大幅降低 Token 消耗。\n- **技能引擎（Skills System）**：支持确定性声明式工作流、动态候选技能提议、自动化验证与热重载。\n\n#### 6. 多层沙箱与企业级安全护栏\n- **物理规范路径包含**：借助 `fs.realpathSync.native` 解析真实路径，彻底阻断跨目录遍历（`..\u002F`）与前缀混淆攻击。\n- **符号链接与 Junction 逃逸防御**：拦截指向受控目录外的软链接与 Windows 目录连接点（NTFS Junction）。\n- **双令牌密码学隔离**：MCP 客户端令牌（`lb_...`）与 Runner 令牌（`lbr_...`）采用 256 位熵生成，仅以 SHA-256 哈希存储；比对均使用恒定时间比较（`crypto.timingSafeEqual`），防止时序侧信道反推。\n- **敏感凭证智能屏蔽**：默认拦截并隐藏 `.env*`、`*.pem`、`*.key`、`id_rsa`、`.git` 及各类云平台凭据文件。\n\n---\n\n### 3. 代码仓库结构\n\n```text\nNexus\u002F\n├── apps\u002F\n│   ├── desktop\u002F          # Tauri 2 + React + Vite 桌面控制中心\n│   ├── runner\u002F           # 本地执行守护进程（332 工具集、Action Ledger、Computer Use）\n│   ├── server\u002F           # Fastify MCP 服务端（SQLite WAL 持久化 & REST API）\n│   └── bridge\u002F           # Nexus MCP 独立网桥（Streamable HTTP \u002F ChatGPT \u002F DeepSeek）\n├── packages\u002F\n│   ├── protocol\u002F         # 纯协议类型层、332 工具规范定义、RPC JSON-Schema\n│   ├── security\u002F         # 沙箱隔离防护、路径规范化验证、命令风控引擎\n│   └── shared\u002F           # 结构化日志（Pino）、配置解析、密码学工具库\n├── tests\u002F                # 自动化测试矩阵（190+ 模块，1200+ 项测试）\n├── docs\u002F                 # 架构设计规范、安全模型与协议文档\n├── artifacts\u002F            # 生产真值审计凭据、能力矩阵与证据账本\n└── scripts\u002F              # 构建编译、依赖捆绑与版本打包脚本\n```\n\n---\n\n### 4. 快速上手\n\n#### 方式 A：使用桌面端安装包（推荐）\n1. 从 [GitHub Releases (v1.3.1)](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Ftag\u002Fv1.3.1) 下载对应平台的最新安装包：\n   - **Windows (x64 安装包)**：[`Nexus_1.3.1_x64-setup.exe`](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Flatest\u002Fdownload\u002FNexus_1.3.1_x64-setup.exe)\n   - **macOS (Universal 通用 DMG)**：[`Nexus_1.3.1_universal.dmg`](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Flatest\u002Fdownload\u002FNexus_1.3.1_universal.dmg)\n   - **macOS (Apple Silicon DMG)**：[`Nexus_1.3.1_aarch64.dmg`](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Flatest\u002Fdownload\u002FNexus_1.3.1_aarch64.dmg)\n   - **Linux (Debian\u002FUbuntu `.deb`)**：[`Nexus_1.3.1_amd64.deb`](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Flatest\u002Fdownload\u002FNexus_1.3.1_amd64.deb)\n   - **Linux (通用 `.AppImage`)**：[`Nexus_1.3.1_amd64.AppImage`](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Flatest\u002Fdownload\u002FNexus_1.3.1_amd64.AppImage)\n   - **油猴脚本 (Tampermonkey)**：[`nexus-1.3.1.user.js`](https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus\u002Freleases\u002Flatest\u002Fdownload\u002Fnexus-1.3.1.user.js)\n2. 双击安装。Nexus 随系统托盘启动，内置自包含 Node.js 运行时、语言服务器和后台执行守护进程，开箱即用。\n\n#### 方式 B：从源码编译与启动\n环境要求：**Node.js >= 24**、**pnpm >= 10**、**Rust stable**。\n\n```powershell\n# 1. 克隆代码仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fysunyang4\u002FNexus.git\ncd Nexus\n\n# 2. 安装项目依赖\npnpm install\n\n# 3. 编译协议包与各子项目\npnpm run build\n\n# 4. 启动桌面控制中心\npnpm --filter @localbridge\u002Fdesktop dev\n```\n\n---\n\n### 5. 接入 AI 客户端\n\n#### 步骤 1：授权本地工程项目\n1. 打开 Nexus 桌面端。\n2. 进入 **工作区 -> 项目管理**，点击 **授权项目** 并选择本地文件夹（如 `D:\\projects\\my-app`）。\n3. 配置 **访问模式**（只读 `read-only` 或 读写 `read-write`）与 **执行模式**（禁用 `disabled`、仅安全命令 `safe-only` 或 完整工程代码 `project-code`），支持在运行期随时二次切换，立即生效。\n\n#### 步骤 2：生成 MCP 访问令牌\n1. 进入 **设置 -> 访问令牌**。\n2. 点击 **生成令牌**，选择 `MCP 客户端令牌`（`lb_...`），复制显示的凭据。\n\n#### 步骤 3：在 AI 工具中配置\n\n**ChatGPT \u002F 自定义 GPT Actions**：\n添加 Streamable HTTP 接口：\n```text\nhttp:\u002F\u002F127.0.0.1:18080\u002Fmcp\n```\nHeader 添加：`Authorization: Bearer lb_your_token_here`\n\n**标准 MCP 客户端配置（`mcp_config.json` 或客户端设置）**：\n```json\n{\n  \"mcpServers\": {\n    \"nexus\": {\n      \"url\": \"http:\u002F\u002F127.0.0.1:18080\u002Fmcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer lb_your_token_here\",\n        \"MCP-Protocol-Version\": \"2024-11-05\"\n      }\n    }\n  }\n}\n```\n\n**Cursor \u002F Windsurf \u002F 通用 MCP 客户端**：\n- 传输类型：`Streamable HTTP`\n- 请求地址：`http:\u002F\u002F127.0.0.1:18080\u002Fmcp`\n- 标头参数：`{\"Authorization\": \"Bearer lb_your_token_here\"}`\n\n---\n\n### 6. 质量保障与验证指令\n\n```powershell\n# 全局 7 个工作区强类型校验（0 错误）\npnpm run typecheck\n\n# 构建各端产物、自包含资源与独立启动器\npnpm run build\n\n# 运行自动化测试套件\npnpm run test\n\n# 验证桌面 Rust 端编译状态\ncargo check --manifest-path apps\u002Fdesktop\u002Fsrc-tauri\u002FCargo.toml\n```\n\n---\n\n### ☕ Sponsor & Support (赞助与支持)\n\nIf Nexus has helped your workflow, research, or daily development, consider buying the author a coffee ☕!\n\nYour generous support helps sustain active open-source maintenance, feature evolution, and bug fixes.\n\n\u003Cdiv align=\"center\">\n  \u003Ctable>\n    \u003Ctr>\n      \u003Ctd align=\"center\" width=\"260\">\n        \u003Cimg src=\"docs\u002Fassets\u002Fwechat-pay.jpg\" width=\"220\" alt=\"WeChat Pay (微信支付)\" \u002F>\u003Cbr \u002F>\n        \u003Cbr \u002F>\n        \u003Cb>WeChat Pay (微信支付)\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd align=\"center\" width=\"260\">\n        \u003Cimg src=\"docs\u002Fassets\u002Falipay.jpg\" width=\"220\" alt=\"Alipay (支付宝)\" \u002F>\u003Cbr \u002F>\n        \u003Cbr \u002F>\n        \u003Cb>Alipay (支付宝)\u003C\u002Fb>\n      \u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftable>\n\u003C\u002Fdiv>\n\n---\n\n### 7. 开源许可证、署名与安全说明\n\n- **软件许可证**：Nexus v1.3.1 依据 [GNU AGPL-3.0](LICENSE) 发布，允许个人与商业使用、学习、修改和再分发，但须遵守许可证原文。\n  - **源码提供义务的适用范围**：分发受 AGPL 约束的程序或修改版，以及让用户通过网络与修改版交互等适用情形，可能触发相应源码和许可声明义务。仅在本地私下修改、不进行相应分发或网络交互服务，并不当然要求公开源码。具体以 AGPL 第 4–6、13 条等规定为准。\n  - **署名与来源**：依许可证保留必须保留的版权、许可证和法律声明，标明适用的修改；不得冒充 Nexus 官方版本。许可终止及恢复遵循 AGPL 第 8 条，而非 README 单方面规定立即终止。\n  - **品牌保护**：[BRAND_GUIDELINES.md](BRAND_GUIDELINES.md) 仅用于说明独立的商标、品牌标识及防混淆问题，不剥夺 AGPL 授予的软件权利。\n  - **第三方归属**：[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) 列明第三方组件，并将概念性架构参考与实际代码依赖分开说明。\n- **安全提醒**：请阅读 [SECURITY.md](SECURITY.md)。启用读写、命令执行、桌面接管或全盘访问会扩大远程 AI 可执行操作的范围，应采取备份、审批和最小权限措施。\n","Nexus 是一个本地 AI 控制平面，用于安全连接 Web 端 AI 助手（如 ChatGPT、DeepSeek）与用户本地环境。它基于 MCP（Model Context Protocol）标准，通过带身份认证的流式 HTTP 隧道实现双向通信，提供 332 个标准化工具接口，覆盖文件操作、终端执行、Git 管理、桌面自动化、LSP 支持等能力，并采用沙箱工作区、WAL 持久化动作日志和细粒度权限控制保障安全性。适用于需要在不上传代码前提下让 AI 协助完成本地开发、调试、运维及文档处理等工程任务的开发者与技术团队。",2,"2026-11-24 04:49:16","CREATED_QUERY"]