Compare commits
22 Commits
ae8f577cd4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 1814ef8d94 | |||
| 64d41cae36 | |||
| a9f7a59783 | |||
| 13f90fc476 | |||
| 6a5bceea35 | |||
| 59f87b84b5 | |||
| 8adab66453 | |||
| 636e39a778 | |||
| 5755ad7c18 | |||
| 33bb76300b | |||
| 527883e201 | |||
| 67b119683c | |||
| d2b9f5e163 | |||
| 2cba096715 | |||
| 86eae0797c | |||
| 92e6b5c8cc | |||
| f0982782b2 | |||
| 23e5051f4a | |||
| f7653280d9 | |||
| a1f51e5db9 | |||
| 9ce0afc519 | |||
| 4218d42d59 |
@@ -76,6 +76,160 @@
|
||||
"message": "auto-save 2026-04-24 20:42 (~1)",
|
||||
"hash": "225c876",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T20:48:13+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 20:48 (~1)",
|
||||
"hash": "d501474",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T20:49:26+08:00",
|
||||
"type": "commit",
|
||||
"message": "deploy: add Dockerfile (nginx:alpine), gitignore source/",
|
||||
"hash": "ae8f577",
|
||||
"files_changed": 3
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T20:53:42+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 20:53 (~1)",
|
||||
"hash": "4218d42",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T20:59:12+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 20:59 (~1)",
|
||||
"hash": "9ce0afc",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:04:39+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:04 (~1)",
|
||||
"hash": "a1f51e5",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:10:07+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:10 (~1)",
|
||||
"hash": "f765328",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:15:35+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:15 (~1)",
|
||||
"hash": "23e5051",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:21:02+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:20 (~1)",
|
||||
"hash": "f098278",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:26:30+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:26 (~1)",
|
||||
"hash": "92e6b5c",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:31:59+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:31 (~1)",
|
||||
"hash": "86eae07",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:37:27+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:37 (~1)",
|
||||
"hash": "2cba096",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:42:56+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:42 (~1)",
|
||||
"hash": "d2b9f5e",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:48:24+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:48 (~1)",
|
||||
"hash": "67b1196",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:53:53+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:53 (~1)",
|
||||
"hash": "527883e",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T21:59:21+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 21:59 (~1)",
|
||||
"hash": "33bb763",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T22:04:48+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 22:04 (~2)",
|
||||
"hash": "5755ad7",
|
||||
"files_changed": 2
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T22:07:04+08:00",
|
||||
"type": "commit",
|
||||
"message": "add §19 延伸思考:VPS+Claude Code+面板 = Cloud Agent Runtime",
|
||||
"hash": "636e39a",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T22:10:16+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 22:10 (~1)",
|
||||
"hash": "8adab66",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T22:15:43+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 22:15 (~1)",
|
||||
"hash": "59f87b8",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T22:21:11+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 22:21 (~1)",
|
||||
"hash": "6a5bcee",
|
||||
"files_changed": 1
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T22:21:47+08:00",
|
||||
"type": "commit",
|
||||
"message": "test: verify Gitea webhook auto-triggers Coolify deploy",
|
||||
"hash": "13f90fc",
|
||||
"files_changed": 0
|
||||
},
|
||||
{
|
||||
"ts": "2026-04-24T22:26:41+08:00",
|
||||
"type": "commit",
|
||||
"message": "auto-save 2026-04-24 22:26 (~1)",
|
||||
"hash": "a9f7a59",
|
||||
"files_changed": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
303
index.html
303
index.html
@@ -467,6 +467,18 @@ footer a { color: var(--cyan); text-decoration: none; }
|
||||
<li><a href="#patterns">设计模式</a></li>
|
||||
<li><a href="#gold">亮点·坑点·可抄</a></li>
|
||||
<li><a href="#comparison">对标启发</a></li>
|
||||
</ul>
|
||||
<div class="group-title">五、延伸思考</div>
|
||||
<ul>
|
||||
<li><a href="#cloud-runtime">Cloud Agent Runtime</a></li>
|
||||
<li><a href="#sandbox-vs-runtime">沙箱 vs Runtime</a></li>
|
||||
<li><a href="#anything-boundary">"任何事"的边界</a></li>
|
||||
<li><a href="#memory-layers">长久记忆的 4 层</a></li>
|
||||
<li><a href="#cc-vs-desktop">Claude Code vs Desktop</a></li>
|
||||
<li><a href="#synthesis-path">合成路径</a></li>
|
||||
</ul>
|
||||
<div class="group-title">六、参考</div>
|
||||
<ul>
|
||||
<li><a href="#reading-path">阅读路径</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -1348,8 +1360,297 @@ results = <span class="kw">await</span> asyncio.<span class="fn">gather</span>(*
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<!-- ========= 延伸思考 ========= -->
|
||||
<section id="cloud-runtime">
|
||||
<h2><span class="sec-num">§19</span>延伸思考 · 从 ARES 沙箱到私人 Cloud Agent Runtime</h2>
|
||||
<p class="sec-lead">
|
||||
拆完 ARES 之后冒出来的一个念头:<strong>"我在 VPS 上装 Linux + Claude Code + 做个面板,是不是就等于 ARES 那种沙箱?能干任何事 + 有长久记忆?"</strong>
|
||||
答案是"基本对,但有几个概念要拆清楚"。下面是把这个思路推完整的全过程。
|
||||
</p>
|
||||
|
||||
<div class="highlight-box">
|
||||
<h4>🎯 本节一句话结论</h4>
|
||||
<p>
|
||||
<strong>"VPS + Linux + Claude Code + Web 面板" ≈ 一个 24×7 在线、跨设备、有累积记忆、隔离可控的私人 Agent 工作台。</strong>
|
||||
这和 ARES 的"训练沙箱"不是一回事(那是 ephemeral 的跑分考场),但共享同一个底层隔离技术栈。"能干任何事"的真正门槛不在架构,在 <strong>沙箱权限 + 工具桥</strong>。
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="sandbox-vs-runtime">
|
||||
<h2><span class="sec-num">§19.1</span>沙箱 ⊂ Agent Runtime</h2>
|
||||
<p class="sec-lead">"沙箱"这个词在 Agent 语境里经常被跟"整套 Agent 工作环境"混用。拆清楚。</p>
|
||||
|
||||
<div class="ascii">┌──────────────────────────────────────────────┐
|
||||
│ <span class="hl-blue">Agent Runtime</span>(整套工作环境) │
|
||||
│ ┌────────────────────────────────┐ │
|
||||
│ │ <span class="hl-violet">Sandbox</span>(隔离执行环境) │ │
|
||||
│ │ ├─ Claude Code 跑这里 │ │
|
||||
│ │ ├─ 工具 / bash / 文件 / git │ │
|
||||
│ │ └─ ~/.claude/(记忆 + 凭证)│ │
|
||||
│ └────────────────────────────────┘ │
|
||||
│ ─ <span class="hl-cyan">Web UI</span>(用户操作入口) │
|
||||
│ ─ <span class="hl-cyan">LLM Key</span>(Claude API) │
|
||||
│ ─ <span class="hl-cyan">持久化</span>(项目 / 历史 / 文件) │
|
||||
│ ─ <span class="hl-cyan">鉴权</span>(谁能进) │
|
||||
└──────────────────────────────────────────────┘</div>
|
||||
|
||||
<p><strong>关键区分</strong>:</p>
|
||||
<ul>
|
||||
<li><strong>Sandbox</strong>(沙箱) = 隔离盒子,防 agent 把宿主搞坏。LXC / Docker / VM 都是实现。</li>
|
||||
<li><strong>Container</strong>(容器) = 沙箱的一种实现。</li>
|
||||
<li><strong>Agent Runtime</strong> = 沙箱 + UI + 鉴权 + 持久化 + 工具桥。</li>
|
||||
</ul>
|
||||
|
||||
<h3>ARES 的沙箱 vs 你说的"VPS + Claude Code"</h3>
|
||||
<table>
|
||||
<tr><th>维度</th><th>ARES 沙箱(训练用)</th><th>VPS + Claude Code(你想做的)</th></tr>
|
||||
<tr><td>生命周期</td><td>ephemeral,每任务一个,跑完就删</td><td>长寿命,跨会话保留</td></tr>
|
||||
<tr><td>目标</td><td>产 reward 给训练器算梯度</td><td>给真人干活</td></tr>
|
||||
<tr><td>谁是用户</td><td>训练框架(trl / verl)</td><td>你自己</td></tr>
|
||||
<tr><td>状态</td><td>无状态(reset 重来)</td><td>有状态(项目 / 历史 / 凭证)</td></tr>
|
||||
<tr><td>隔离粒度</td><td>每任务独立容器</td><td>一个 runtime 跑一段时间</td></tr>
|
||||
<tr><td>UI</td><td>无,CLI 跑分</td><td>必须有</td></tr>
|
||||
<tr><td>类比</td><td>健身房器械</td><td>出租公寓</td></tr>
|
||||
</table>
|
||||
<div class="callout green">
|
||||
<strong>结论</strong>:你问的那个东西 ≈ <strong>Cloud Agent Runtime</strong>,<strong>里面包含沙箱</strong>,但不只是沙箱。和 ARES 不是同一个层次的东西。
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="anything-boundary">
|
||||
<h2><span class="sec-num">§19.2</span>"能干任何事"的 4 个边界</h2>
|
||||
<p class="sec-lead">能干多少事,跟你用几个 Claude Code 无关,取决于 4 个维度:</p>
|
||||
|
||||
<table>
|
||||
<tr><th>维度</th><th>决定</th><th>可调</th></tr>
|
||||
<tr><td>🔓 <strong>沙箱权限</strong></td><td>能摸什么(挂了哪些目录、有没有 sudo)</td><td>挂 <code>/workspace</code> 只能祸害工作区;挂 <code>/</code> 能改系统</td></tr>
|
||||
<tr><td>🛠 <strong>工具桥</strong></td><td>能做什么(MCP / CLI 工具 / API)</td><td>装 Playwright → 操作浏览器;装 adb → 操作手机;加 HA MCP → 控家电</td></tr>
|
||||
<tr><td>🌐 <strong>外网出口</strong></td><td>能碰谁(VPS 网络 / 防火墙 / VPN)</td><td>公网全开 = 爬网页 / 调 API 都行;不通内网 = 摸不到 NAS</td></tr>
|
||||
<tr><td>💳 <strong>API 配额</strong></td><td>能跑多久(Anthropic / OpenAI 账号限流)</td><td>订阅等级决定长任务能不能跑通</td></tr>
|
||||
</table>
|
||||
|
||||
<div class="compare">
|
||||
<div class="compare-col a">
|
||||
<h5>默认就能干</h5>
|
||||
<ul>
|
||||
<li>✅ 写代码 / 改文件 / 跑脚本</li>
|
||||
<li>✅ 部署服务 / 管 git 仓库</li>
|
||||
<li>✅ 爬公网 / 调任意 API</li>
|
||||
<li>✅ 长任务(几小时)</li>
|
||||
<li>✅ 跨设备接续(手机 / iPad / 别的电脑)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="compare-col b">
|
||||
<h5>加工具桥才能干</h5>
|
||||
<ul>
|
||||
<li>🛠 浏览器操作 → Playwright / browser-use</li>
|
||||
<li>🛠 手机控制 → adb / scrcpy</li>
|
||||
<li>🛠 家电控制 → Home Assistant MCP</li>
|
||||
<li>🛠 邮件 / 日历 → Gmail MCP / Google Calendar MCP</li>
|
||||
<li>🛠 设计 → Figma MCP / Pencil MCP</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="callout red">
|
||||
<strong>永远干不了</strong>:碰你家局域网(除非 VPN)· 操作你本机显示器 · 绕过 API 限流 · 物理世界(除非接机器人 / IoT)
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="memory-layers">
|
||||
<h2><span class="sec-num">§19.3</span>"长久记忆"的 4 层</h2>
|
||||
<p class="sec-lead">
|
||||
关键事实:<strong>Claude(LLM 本身)每次 API 调用都是从 0 开始</strong>,没有任何内生记忆。
|
||||
"长久记忆"完全靠<strong>文件系统 + prompt 注入</strong>。
|
||||
</p>
|
||||
|
||||
<div class="ascii">┌─────────────────────────────────────────────────────────┐
|
||||
│ <span class="hl-blue">Claude Code 的记忆分层</span> │
|
||||
│ │
|
||||
│ <span class="hl-green">1. 用户级 CLAUDE.md</span> ~/.claude/CLAUDE.md │
|
||||
│ → 每次打开 Claude Code 自动加载(所有项目共用) │
|
||||
│ │
|
||||
│ <span class="hl-green">2. 项目级 CLAUDE.md</span> <project>/CLAUDE.md │
|
||||
│ → 进入该项目时加载 │
|
||||
│ │
|
||||
│ <span class="hl-violet">3. Auto-memory</span> ~/.claude/projects/<slug>/memory/ │
|
||||
│ → <span class="hl-yellow">当前会话就在用</span>!每个 memory 是独立 md 文件 │
|
||||
│ 索引在 MEMORY.md,自动加载 │
|
||||
│ │
|
||||
│ <span class="hl-cyan">4. 会话历史</span> ~/.claude/projects/<slug>/*.jsonl │
|
||||
│ → 本次对话完整 transcript,下次 /continue 能接 │
|
||||
└─────────────────────────────────────────────────────────┘</div>
|
||||
|
||||
<div class="highlight-box">
|
||||
<h4>💡 活例子:你正在读的这份报告</h4>
|
||||
<p>
|
||||
我(Claude Code)在这个会话里之所以"记得"你做过法考、AutoScan、LobeChat、Hermes、HiClaw、ARES 这几十个项目,知道你用 Coolify + Traefik,知道 Gitea 用户名是 <code>kangwan</code> 不是 <code>kangwang</code> ——
|
||||
<strong>全部从 <code>~/.claude/projects/-Users-kangwan/memory/</code> 读出来的</strong>。这就是"长久记忆"的实体。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p><strong>VPS 场景下的结论</strong>:只要沙箱内的 <code>~/.claude/</code> 目录<strong>持久化</strong>,记忆就一直在。用得越久,Claude 对你的工作习惯、项目、凭证、偏好、决策风格的了解越深。</p>
|
||||
|
||||
<h3>⚠️ 三个实际的坑</h3>
|
||||
<ol>
|
||||
<li><strong>登录凭证也在沙箱里</strong>:<code>~/.claude/.credentials.json</code> —— 沙箱销毁 = 登录失效。沙箱必须私有 + 持久化,别放 ephemeral 卷。</li>
|
||||
<li><strong>多窗口并发抢 API 配额</strong>:VPS 一套 + 手机 + Mac 三个会话共享一个 Anthropic 账号的限流。</li>
|
||||
<li><strong>跟本机 Claude Code 相比</strong>:VPS 合盖不断 / 跨设备好,但 CPU 慢 / 网络 IO 慢 / VPS 供应商理论能看数据。</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section id="cc-vs-desktop">
|
||||
<h2><span class="sec-num">§19.4</span>Claude Code vs Claude Desktop / Web</h2>
|
||||
<p class="sec-lead">
|
||||
两个工具共享同一个 Claude 模型(API 层),但<strong>上层设计目标完全不同</strong>,决定了擅长什么、不擅长什么。
|
||||
</p>
|
||||
|
||||
<div class="ascii"> ┌──────────────────────────────┐
|
||||
│ <span class="hl-blue">Claude API</span> │
|
||||
│ (Anthropic 云端模型) │
|
||||
└──────────────────────────────┘
|
||||
↑ ↑ ↑
|
||||
┌────────────┼───┼───┴────────────┐
|
||||
│ │ │ │
|
||||
<span class="hl-violet">Claude Code</span> <span class="hl-cyan">Claude Desktop</span> <span class="hl-green">Claude.ai 网页</span>
|
||||
(CLI+工具) (桌面聊天) (浏览器)
|
||||
│ │ │
|
||||
自带客户端 无头 Linux 浏览器打开
|
||||
能力 VPS 装不了 即可
|
||||
(要 GUI)</div>
|
||||
|
||||
<h3>两种设计取向的对比</h3>
|
||||
<table>
|
||||
<tr><th></th><th>Claude Desktop / Web</th><th>Claude Code</th></tr>
|
||||
<tr><td>设计目标</td><td>聊天 + 多模态展示</td><td>工程任务 + 工具调用</td></tr>
|
||||
<tr><td>前端</td><td>✨ 漂亮 UI / Artifacts / 图表</td><td>📟 终端(文字为主)</td></tr>
|
||||
<tr><td>上下文</td><td>几百 K(看订阅)</td><td>🔥 <strong>1M token</strong>(本报告生成会话就是)</td></tr>
|
||||
<tr><td>长任务</td><td>❌ 容易丢早期内容</td><td>✅ 自动压缩 + 断点续传</td></tr>
|
||||
<tr><td>文件系统</td><td>❌ 只能上传片段</td><td>✅ 随便读写</td></tr>
|
||||
<tr><td>跑命令</td><td>❌ 不能</td><td>✅ bash / git / apt 随便</td></tr>
|
||||
<tr><td>并行子任务</td><td>❌ 一条线</td><td>✅ Subagent 并发(本次报告用了 3 个)</td></tr>
|
||||
<tr><td>MCP 生态</td><td>✅ 同样支持</td><td>✅ 同样支持</td></tr>
|
||||
<tr><td>视觉资产</td><td>✅ Artifacts 实时渲染</td><td>⚠️ 要开浏览器看</td></tr>
|
||||
<tr><td>连续 8 小时工作</td><td>❌ 会断 / 会丢</td><td>✅ 稳</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>为什么 Claude Code 擅长长任务(不是偶然,是设计)</h3>
|
||||
<div class="card-grid">
|
||||
<div class="card">
|
||||
<h4>1M context</h4>
|
||||
<p>1 小时对话里积累的文件 / 日志 / 截图都记得住。</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h4>自动压缩</h4>
|
||||
<p>逼近 context 极限自动摘要历史,不打断任务。</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h4>Subagent 并行</h4>
|
||||
<p>大任务拆小任务同时跑,省 token 省时间。</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h4>Task / Todo 持久化</h4>
|
||||
<p>任务列表跨轮次不丢。</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h4>Auto-memory</h4>
|
||||
<p>跨会话的偏好 / 约定记得。</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h4>File-first</h4>
|
||||
<p>长产出写文件不堆 context,下次直接读。</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h4>Hooks / Skills</h4>
|
||||
<p>自动化流程 / 钩子 / 专家模块可配置。</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h4>Plan mode</h4>
|
||||
<p>复杂任务先规划后执行,不盲目动手。</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="callout">
|
||||
<strong>观察</strong>:Claude Desktop 功能广(MCP 集成 / Artifacts / Project)但 <strong>编写程序 + 长任务</strong> 差很多。Claude Code 正相反:前端简陋,但对工程任务和持久工作有专门优化。
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="synthesis-path">
|
||||
<h2><span class="sec-num">§19.5</span>合成路径 · Desktop 的体验 + Claude Code 的能力</h2>
|
||||
<p class="sec-lead">
|
||||
这是自然会冒出来的念头:
|
||||
<strong>能不能把 Claude Desktop 的漂亮 UI 和 Claude Code 的长任务 / 工具 / 文件 / 稳定合在一起?</strong>
|
||||
可以,有 4 条路径,工程量不等。
|
||||
</p>
|
||||
|
||||
<div class="ascii">┌─────────────────────────────────────────────┐
|
||||
│ 理想态: │
|
||||
│ ┌─────────────────────────────────────┐ │
|
||||
│ │ 前台:漂亮聊天 UI(Desktop 体验) │ │
|
||||
│ │ ↓ 下发任务 │ │
|
||||
│ │ 后台:Claude Code 干活 │ │
|
||||
│ │ (长任务 / 工具 / 文件 / 稳) │ │
|
||||
│ └─────────────────────────────────────┘ │
|
||||
└─────────────────────────────────────────────┘</div>
|
||||
|
||||
<table>
|
||||
<tr><th>路径</th><th>做法</th><th>成本</th><th>优 / 劣</th></tr>
|
||||
<tr>
|
||||
<td>🟢 <strong>本机并用</strong></td>
|
||||
<td>Claude Desktop 聊天 + 开终端跑 Claude Code。手动搬任务。</td>
|
||||
<td>0(现在就能用)</td>
|
||||
<td>优:零成本;劣:两 session 不联动</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🟡 <strong>Desktop 前台 + MCP 后台</strong></td>
|
||||
<td>Desktop 配 MCP server,MCP 背后是 Claude Code / 自写 agent。Desktop 判断"需要长任务"时丢过去。</td>
|
||||
<td>中(要写 MCP server)</td>
|
||||
<td>优:看起来像"Desktop 内嵌 Claude Code";劣:当前没有成熟现成的方案</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🟠 <strong>自建 Web UI 套 Claude Code</strong></td>
|
||||
<td>做 Web 聊天界面(像 LobeChat / Chatbot UI),后端跑 Claude Code。</td>
|
||||
<td>中(几天 UI 开发)</td>
|
||||
<td>优:完全自控 / 能跑云端 / 跨设备;劣:UI 工程</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🔴 <strong>魔改 Claude Code 做 Agent 平台</strong></td>
|
||||
<td>Fork Claude Code,把 TUI 换成 Web UI,嵌进自己的壳。</td>
|
||||
<td>高(大工程)</td>
|
||||
<td>优:能力最完整;劣:跟不上 Claude Code 上游迭代</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>你的最经济路径</h3>
|
||||
<p>如果已有下面这些积累(大部分开发者都有某种变体):</p>
|
||||
<ul>
|
||||
<li>一个 <strong>Web UI 聊天壳</strong>(LobeChat / Chatbot UI / 自写的)</li>
|
||||
<li>一个 <strong>VPS + 容器平台</strong>(Coolify / Dokploy / K8s)</li>
|
||||
<li>熟悉 <strong>LXC / Docker / 鉴权 / 反代</strong></li>
|
||||
</ul>
|
||||
<p>那么合成路径其实就是<strong>路径 3 的简化版</strong>:</p>
|
||||
<div class="ascii">Web UI 聊天壳(已有)
|
||||
↓ 发消息
|
||||
后端网关
|
||||
↓ 路由判断
|
||||
├─ 简单聊天 → 直接调 <span class="hl-blue">Claude API</span>(现做法)
|
||||
└─ 复杂任务 → spawn <span class="hl-violet">Claude Code 进程</span> → 返回结果</div>
|
||||
|
||||
<p>改动只在后端加一个"长任务分流到 Claude Code"的路由。UI 不动。</p>
|
||||
|
||||
<div class="highlight-box">
|
||||
<h4>🧭 这就是 Manus / Devin / OpenHands / Cursor 在做的事</h4>
|
||||
<p>
|
||||
这些商业产品的核心逻辑都是:<strong>把 Claude Code 那种工程能力包装成 Chat UI</strong>。
|
||||
你自建的好处 = 私有 + 数据留自己手里 + 不用每月付费 + 能接你特有的工具桥(公司内网 / 私有 API / 私有 MCP)。
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
<!-- ========= 延伸思考结束 ========= -->
|
||||
|
||||
<section id="reading-path">
|
||||
<h2><span class="sec-num">§19</span>阅读路径推荐</h2>
|
||||
<h2><span class="sec-num">§20</span>阅读路径推荐</h2>
|
||||
<p class="sec-lead">想理解 ARES,按以下顺序读最省脑。</p>
|
||||
|
||||
<ol style="font-size: 0.92rem;">
|
||||
|
||||
Reference in New Issue
Block a user