omp in the terminal is “good enough”. Sessions, tool calls, permission prompts — all doable in a terminal window.

But not good.

Want to revisit yesterday’s session? ls through a pile of JSONL. Compare three branches side by side? Open three terminal windows. Check whether MCP is hooked up? Dig through config files. Switch Git worktrees? Open another pane. Glance at progress from your phone in bed? Forget it.

TL;DR ompweb is a local workbench for oh-my-pi: it doesn't rewrite the agent, it just reads its session files — the session tree, terminal, MCP status, and Git worktrees all laid out on one desk. One hard rule in the design: OMP writes sessions, ompweb only displays and orchestrates; session authority always stays with OMP. The stack is Next.js 16 + Electron 44 plus a Rust-built ompweb-host daemon, and one npx line gets it running; phone remote rides a secure WebSocket, with its slot already reserved in the architecture.
Workbench collage: session monitor, terminal, phone remote, and MCP cards
One desk: session tree, terminal, MCP status, Git branches, and phone remote — all visible.

I didn’t want to replace omp. I wanted a desk: the sessions, terminals, files, and MCP status that already exist, laid out where I can see them.

ompweb’s positioning is on page one of the README: a modern, high-performance, local-first web workspace and native desktop app for oh-my-pi.

The key design is just one line — don’t rewrite the agent, just read its session files.

~/.omp/agent/sessions/   ← single source of truth for sessions
        ↓ browse / branch / archive (narrow writes)
     ompweb (Next.js / Electron)
        ↓ live execution
  omp --mode rpc-ui  ← OMP stays the runtime

Local sessions get scanned straight from JSONL by Node; live work goes through omp --mode rpc-ui (NDJSON over stdio). The OMP SDK lives on the Bun side — the Node service deliberately never imports it, to avoid mixing runtimes.

In one line: OMP writes sessions, ompweb displays and orchestrates; the UI holds no authority.

Problem

Terminals have four ceilings:

Local-first architecture
Session JSONL is the authority; ompweb displays and writes narrowly; live execution goes through omp.
  1. History is invisible — sessions live in files, not in front of you. Finding last Tuesday’s “Continue from here” branch point means ls plus memory.
  2. Multi-window has no structure — branching, comparing, rolling back all depend on manual window juggling. Three terminal windows lined up, all context in your head.
  3. The ecosystem is invisible — MCP, skills, Git state scattered everywhere. An MCP server died and you only find out while reading a config file.
  4. You disconnect the moment you leave the machine — a long job runs in the dorm while you’re in class, and progress is a guessing game.

Rewrite an agent and you split the ecosystem. ompweb chose to stand next to omp, not across from it.

Runtime baseline
Node ≥22.19, Next.js 16.3, Electron 44.

Approach

The architecture is four layers, each with rigidly defined responsibilities (the README has the full diagram; here’s the compressed text version):

Client layer:  Browser (React 19 / Next.js 16) · Electron shell (tray / auto-update)
               Remote web / mobile client (HMAC-SHA256 challenge-proof)
             ↓ HTTP / SSE · secure WebSocket
Web server:    Next.js (Node 22+) — API routes (/api/agent, /api/terminal, /api/native-settings)
               HostClient (typed contracts + fail-closed facade)
               Session reader & fast projection cache
             ↓ bounded NDJSON IPC (Unix Domain Socket / Named Pipe)
Rust daemon    Git service (diff/status/commit/branches/push)
ompweb-host:   PTY service (virtual terminal, bounded buffer, resizing)
               Session scanner (head-window streaming indexing <15ms)
               Settings service (OMP config proxy, compact NDJSON)
               Remote runtime (WS protocol v1, 24-hour mutation ledger)
               Process supervisor (omp lifecycle, crash recovery, --resume)
               SQLite journal & device registry (crash-safe continuity)
             ↓ stdio RPC
OMP runtime:   omp --mode rpc-ui — session files (~/.omp/agent/sessions/, JSONL + gzip archives)
               model config (~/.omp/agent/models.yml)
Four-layer architecture infographic: clients, web server, Rust daemon, storage
Four layers of architecture: session authority sits at the bottom, and the UI never touches it.

Sinking the heavy work (Git diff, PTY, session scanning, process supervision) into Rust’s ompweb-host is a performance-and-memory-safety call: Node/Next handles API routes and rendering, while the latency-sensitive dirty work goes to a memory-safe native process. The session scanner does head-window streaming indexing, targeting results within 15ms — open a repo with thousands of session files without a stutter.

Two iron rules at the boundary. First, the write path is deliberately narrow: session authority lives with OMP; ompweb keeps only low-risk operations like rename / archive / delete / branch-parent. Try to write everything and you’ll fight the live process. Second, guard the SDK boundary: the OMP SDK is Bun-only; the Node/Next service can’t just import it for convenience. Work has to go through omp --mode rpc-ui, sealed behind HostClient’s typed contracts and fail-closed facade.

Security is a default, not an option: loopback-only binding out of the box (127.0.0.1); a password gate with signed cookies when OMP_WEB_PASSWORD is set; file viewing and terminal roots locked inside a path-whitelist sandbox of registered projects; data sovereignty as a principle — ompweb introduces no secondary proprietary stores and holds no API keys. All state defers to the omp binary and ~/.omp/agent/ you installed.

In Practice

Three ways to start; Web mode is the smoothest:

npx @37chengshan/ompweb@latest        # zero-install, opens on 127.0.0.1:30177
npm install -g @37chengshan/ompweb && ompweb   # global install, ready anytime

The desktop is an Electron shell (tray-resident, Dock status, independent window lifecycle), with prebuilt installers for mac / Windows / Linux. Server scenarios need just three flags:

ompweb --port 8080 --hostname 0.0.0.0 --password "a-strong-password" --no-open
# env vars work too: PORT=8080 OMP_WEB_PASSWORD="password" ompweb

Features are laid out as a “workbench”, not a “chat window”, each one mapping to a terminal pain point:

  • Session & version tree: multi-project auto-grouping; “Continue from here” branches off any historical turn point to try another technical route without losing context; fork any user message into a clean, independent session; archives align exactly with OMP’s native archive/sessions/<cwd>/<file>.jsonl.gz, plus rename, auto-naming, and single-file HTML export; a live telemetry panel shows token usage, cost, elapsed time, context gauge, compaction diffs, and real-time TPS.
  • Interactive web PTY: node-pty allocates real shells (zsh/bash on macOS/Linux, cmd.exe on Windows) with ANSI 256/TrueColor, cursor navigation, and working Tab completion; keystrokes ride a FIFO queue with a 5s timeout, capped at 8 concurrent sessions with 30-minute idle reaping — resource limits hardcoded, no leaks.
  • Multi-agent orchestration & plan kanban: the todo plan panel pins above the input bar and syncs live; running subagents get pulsing indicators with current tool call, tokens, cost, and retries visible; subagent transcripts can be read as summaries or paged byte-wise; the built-in Agent-MCP orchestrator speaks 11+ Agent CLIs with dedicated roles (designer, librarian, reviewer, scout, security-reviewer, sonic, task).
  • Workspace, Git worktrees & media previews: switch worktrees from the sidebar while the file tree and session context follow instantly; code highlighting, Markdown (KaTeX math, Mermaid diagrams), PDF, DOCX, audio, and image lightbox previews.
  • Visual MCP & skill hub: a dual-mode MCP editor (visual form + raw JSON) with built-in templates (Python stdio, NPX stdio, Remote HTTP, Brave Search, PostgreSQL, GitHub, Fetch); the skill market scans local .omp/skills and searches online via skills.sh with one-click install/update; omp plugin modules get visual enable/disable/upgrade.
  • Models & native OMP settings: a visual models matrix edits ~/.omp/agent/models.yml directly — switch providers, test connectivity; Advisor policy, command approval, Bash execution mode, thinking depth, compaction algorithms, memory, and auto-learning all adjustable from the UI; favorite slash commands (/goal, /plan, /terminal, /theme, /mcp, /review, /fix, /test, /explain) one click away.
  • Theme studio: 18+ preset themes plus 6 fluid animated dynamic themes, adjustable fonts, scaling, and motion, honoring OS prefers-reduced-motion; a ⌘K / Ctrl+K command palette; full English / Simplified Chinese / Japanese i18n that follows the system locale.

Phone remote is the most ambitious piece of the architecture. The remote runtime speaks WS protocol v1 with a 24-hour mutation ledger plus an SQLite journal & device registry — drop the connection on your phone and state resumes from the ledger; clients authenticate with an HMAC-SHA256 challenge-proof, nothing in the clear. The target scene is concrete: a long job runs in the dorm while you’re in class, and you can glance at session status, pause/resume a PTY, and check the telemetry panel from your phone. This part is still in progress, but its slot is already reserved in the architecture — not a patch bolted on later.

Quality gates live in scripts too: 450+ unit tests (npm test), TypeScript checks, ESLint, and npm run release:check for a one-command full pass. The repo has 877 commits and 13 releases under MIT, with upstream lineage from the pi-web / oh-my-pi ecosystem.

Results

Three tradeoffs, none of them hidden:

  • The architecture gets thicker. After adding the host daemon, the debugging surface grows — UI, Next, host, omp, four layers to walk through when something breaks. That’s the cost of local-first: the Rust daemon bought latency down, and you pay for it in debugging surface.
  • The write path has to stay narrow. Everything can be displayed; only four low-risk operations can be written. That’s a boundary the author set on purpose — let the UI write everything and it’ll fight the live process sooner or later.
  • Secure defaults are non-negotiable. Loopback by default, the password gate, the path whitelist — docs and secure defaults have to keep up with the features.

It doesn’t invent a new agent — it just puts the omp sessions that already exist on a desk you can actually use. And a desk you can glance at from your phone when you’re out.

npx @37chengshan/ompweb@latest

Main repo: 37chengshan/ompweb.

Try It Now

Ten minutes to set up the desk:

  1. Look before you install. Check the screenshots on the Releases page (Light/Dark themes) and make sure this is the “desk” you want before touching anything.
  2. One line to launch. npx @37chengshan/ompweb@latest (needs Node ≥ 22.19 and omp installed); the browser opens http://127.0.0.1:30177 automatically. Don’t change any config yet — just look at what yesterday’s sessions look like.
  3. Try the three core moves. Find an old session in the tree: ① “Continue from here” to branch off a historical turn; ② archive it and watch what changes under ~/.omp/agent/sessions/; ③ open a web PTY, run ls, and feel the real shell’s completion and colors.
  4. Wire up your ecosystem. Check existing server status in the MCP hub, add a Brave Search with a template; sweep the skill market over your local skills; switch a provider in the models matrix and hit “test connectivity.”
  5. Lock it down when going remote. Set a strong --password, bind --hostname to a trusted LAN IP only, and don’t rush to change the loopback default. Remember: the UI only ever displays and orchestrates — session authority stays with OMP.

FAQ

Is ompweb meant to replace omp?

No. The author is explicit: it’s not about replacing omp, it’s about wanting a “desk”. ompweb doesn’t rewrite the agent, it just reads its session files; live execution still goes through omp --mode rpc-ui — standing next to omp, not across from it.

How does it read my sessions?

~/.omp/agent/sessions/ is the single source of truth: local history gets scanned straight from JSONL (the Rust daemon’s head-window streaming indexing targets sub-15ms results), live work goes through omp --mode rpc-ui (NDJSON over stdio). In one line: OMP writes sessions, ompweb displays and orchestrates.

Is it safe to change sessions with it?

The write path is deliberately narrow — only low-risk operations like rename / archive / delete / branch-parent. Try to write everything and you’ll fight the live process — that’s a boundary the author set on purpose. Under the data-sovereignty principle it also introduces no second data store and holds no API keys.

How do I run it? What do I need?

Web version, one line: npx @37chengshan/ompweb@latest, listening on 127.0.0.1:30177 by default (needs Node ≥ 22.19 and omp installed); desktop installers too (mac / Windows / Linux), plus npm run dev local dev mode on port 30178. The stack is Next.js 16 + Electron 44 + a Rust daemon, MIT license.

Can I use it remotely on a server? What about my phone?

On a server, yes — --password, --hostname, --no-open exist exactly for that; loopback only by default. Phone remote rides a secure WebSocket (HMAC-SHA256 challenge-proof) with WS protocol v1 and a 24-hour mutation ledger, so a dropped connection resumes from the ledger — the architectural slot is reserved, the feature is still in progress.

Does the Rust daemon make debugging harder?

Yes. UI, Next, host, omp — four layers to walk through when something breaks. That’s the cost of local-first: Rust bought latency and memory safety for Git diff, PTY, and session scanning, but the debugging surface got thicker. The hedge is 450+ unit tests and release:check as a one-command full pass.

The X-thread version

① The hook: omp in the terminal is good enough, not good — yesterday’s session means ls-ing through JSONL, three branches mean three windows juggled by hand, a dead MCP means finding out from a config file. What’s missing isn’t features; it’s a desk.

② ompweb is that desk: it doesn’t rewrite the agent, it just reads ~/.omp/agent/sessions/. One hard design rule — OMP writes sessions, ompweb only displays and orchestrates; session authority never leaves OMP.

③ Four-layer architecture: clients (browser / Electron / phone) → Next.js web service → Rust daemon ompweb-host → the omp runtime. All heavy work (Git / PTY / session scanning / process supervision) sinks into Rust; Node only does API and rendering.

④ The write path is deliberately narrow: just rename / archive / delete / branch-parent — four low-risk operations. Try to write everything and you’ll fight the live process. The SDK boundary is sealed too: the OMP SDK is Bun-only; the Node service may not import it directly.

⑤ Features arranged as a workbench: “Continue from here” branches off any session turn, a web PTY with real shells (8-concurrency cap / 30-minute idle reaping), a pinned plan kanban, pulsing subagent monitors, a visual MCP editor, one-click skill installs from the market.

⑥ Security is a default: loopback binding, a password gate over signed cookies, a path-whitelist sandbox, no second data store, no stored API keys. Data sovereignty: all state defers to your local omp.

⑦ Phone remote: secure WebSocket + HMAC-SHA256 challenge-proof + 24-hour mutation ledger — drop the connection and resume from the ledger. A long job runs in the dorm while you’re in class, and you can glance at progress. The slot is reserved in the architecture; the feature is in progress.

⑧ No hidden tradeoffs: four layers mean a thicker debugging surface (walk UI → Next → host → omp); that’s the cost of local-first. The hedge is 450+ unit tests and release:check.

⑨ Action: npx @37chengshan/ompweb@latest (Node ≥ 22.19 + omp installed), look at yesterday’s sessions first, then try branch → archive → PTY. Add --password when going remote. Full article: https://citygenius-blog.pages.dev/article/project-ompweb

终端里的 omp 其实「够用」。会话、工具调用、权限确认,都能在黑底白字里完成。

但不够「好用」。

想回看昨天的会话,只能 ls 一堆 JSONL。想同时开三个分支对比,只能开三个终端窗口。想看 MCP 有没有挂上,翻配置文件。想切 Git worktree,再开一个 pane。想在床上拿手机看一眼跑完没——对不起,门都没有。

一句话总结 ompweb 是给 oh-my-pi 配的一张本地工作台:不重写 Agent,只读它的会话文件,把会话树、终端、MCP 状态、Git worktree 摊在一张桌子上看。设计上只有一条硬规矩——OMP 写会话、ompweb 只做展示和编排,会话权威永远在 OMP 那边。技术栈是 Next.js 16 + Electron 44,外加一个 Rust 写的 ompweb-host 守护进程,一行 npx 就能跑起来;手机遥控走安全 WebSocket,已经在架构里预留了位置。
工作台拼贴:会话监控、终端、手机遥控与 MCP 卡片
一张桌子:会话树、终端、MCP 状态、Git 分支、手机遥控都看得见。

我不是想换掉 omp。我是想要一张桌子:把已经存在的会话、终端、文件、MCP 状态摊开看。

ompweb 的定位写在 README 第一页:oh-my-pi 的现代化、高性能、本地优先的 Web 工作区与原生桌面应用。

关键设计只有一条——

不重写 Agent,只读它的会话文件。

~/.omp/agent/sessions/   ← 唯一会话权威
        ↓ 浏览 / 分支 / 归档(窄写)
     ompweb (Next.js / Electron)
        ↓ live 执行
  omp --mode rpc-ui  ← OMP 仍是 runtime

本地会话用 Node 直接扫 JSONL;live 工作走 omp --mode rpc-ui(stdio 上的 NDJSON)。OMP SDK 在 Bun 侧,Node 服务刻意不 import,避免把运行时搞混。

一句话:OMP 写会话,ompweb 展示和编排;权威不在 UI。

问题

终端有四个天花板:

本地优先架构
会话 JSONL 为权威;ompweb 展示与窄写;live 执行走 omp。
  1. 历史不可视 —— 会话在文件里,不在眼前。想找回三天前那次 “Continue from here” 的分支点,靠 ls 和记忆。
  2. 多开无结构 —— 分支、对比、回滚靠人肉窗口管理。三个终端窗口排一排,上下文全在脑子里。
  3. 生态不可见 —— MCP、技能、Git 状态散落各处。MCP 挂了你都不知道,翻配置文件才发现。
  4. 人不在电脑前就断联 —— 宿舍跑着长任务,人去上课了,进度只能靠猜。

如果重写一个 Agent,你就分裂了生态。ompweb 选择站在 omp 旁边,而不是对面。

运行时基线
Node ≥22.19、Next.js 16.3、Electron 44。

方法

架构是四层,每一层的职责都写得很死(README 里有一张完整的大图,我把它压成文字版):

客户端层:浏览器(React 19 / Next.js 16)· Electron 桌面壳(托盘/自动更新)
          远程 Web / 手机客户端(HMAC-SHA256 质询证明)
        ↓ HTTP / SSE · 安全 WebSocket
Web 服务层:Next.js(Node 22+)——API 路由(/api/agent、/api/terminal、/api/native-settings)
          HostClient(类型化契约 + 失败关闭外观)
          会话读取器 & 快速投影缓存
        ↓ 有界 NDJSON IPC(Unix Domain Socket / Named Pipe)
Rust 守护进程 ompweb-host:Git 服务(diff/status/commit/分支/push)
          PTY 服务(虚拟终端、有界缓冲、缩放)
          会话扫描器(头窗口流式索引 <15ms)
          设置服务(OMP 配置代理、紧凑 NDJSON)
          远程运行时(WS 协议 v1、24 小时变更账本)
          进程监督器(omp 生命周期、崩溃恢复、--resume)
          SQLite 日志 & 设备注册表(崩溃安全连续性)
        ↓ stdio RPC
OMP 运行时:omp --mode rpc-ui —— 会话文件(~/.omp/agent/sessions/,JSONL + gzip 归档)
          模型配置(~/.omp/agent/models.yml)
四层架构信息图:客户端、Web 服务、Rust 守护进程、存储层
四层架构:会话权威在最底层,UI 永远不碰它。

把重活(Git diff、PTY、会话扫描、进程监督)下沉到 Rust 的 ompweb-host,是性能和内存安全的选择:Node/Next 只管 API 路由和渲染,低延迟的脏活交给内存安全的原生进程。会话扫描器做头窗口流式索引,目标是 15ms 内出结果——几千个会话文件的仓库,打开不卡。

边界有两条铁律。第一,写路径故意窄:会话权威在 OMP,ompweb 只保留 rename / archive / delete / branch-parent 这类低风险操作。什么都想写,就会和 live 进程打架。第二,SDK 边界守住:OMP SDK 是 Bun-only,Node/Next 服务不能图省事直接 import。活儿必须走 omp --mode rpc-ui,HostClient 用类型化契约 + 失败关闭外观封死。

安全是默认配置,不是选配:默认只绑 loopback(127.0.0.1);配了 OMP_WEB_PASSWORD 就走签名 Cookie 的密码门;文件查看和终端根目录被路径白名单沙箱锁在已注册项目里;数据主权原则——ompweb 不引入第二套专有数据存储、不存 API key,一切状态都认你本机装的 omp 和 ~/.omp/agent/。

做法

三种启动方式,Web 模式最顺手:

npx @37chengshan/ompweb@latest        # 零安装即开,127.0.0.1:30177
npm install -g @37chengshan/ompweb && ompweb   # 全局安装,随叫随到

桌面端是 Electron 壳(托盘常驻、Dock 状态、独立窗口生命周期),mac / Windows / Linux 都有预编译安装包。服务器场景加三个 flag 就走:

ompweb --port 8080 --hostname 0.0.0.0 --password "强密码" --no-open
# 环境变量也行:PORT=8080 OMP_WEB_PASSWORD="密码" ompweb

功能面按「工作台」而不是「聊天窗」来铺,每一块都对应终端里的一个痛点:

  • 会话树与版本树:多项目自动归组;分支导航里点「Continue from here」,在任意历史拐点开分支试另一条技术路线,原上下文不丢;fork 任意一条用户消息成干净独立会话;归档格式和 OMP 原生 archive/sessions/<cwd>/<file>.jsonl.gz 完全对齐,还支持重命名、自动命名、单文件 HTML 导出;实时遥测面板看 token 用量、花费、耗时、上下文水位、压缩 diff、实时 TPS。
  • 交互式 Web PTY:node-pty 分配真 shell(macOS/Linux 用 zsh/bash,Windows 用 cmd.exe),ANSI 256/真彩色、光标导航、Tab 补全都正常;按键走 FIFO 队列带 5 秒超时,全局最多 8 个并发、30 分钟空闲自动回收——资源上限写死,不怕泄漏。
  • 多 Agent 编排与计划看板:待办计划面板钉在输入框上方实时同步;子 agent 跑起来有呼吸灯,当前工具调用、token、花费、重试都看得见;子 agent transcript 可以看摘要也可以按字节翻页;内置 Agent-MCP 编排器,支持 11+ 种 Agent CLI,带 designer / librarian / reviewer / scout / security-reviewer / sonic / task 等专用角色。
  • 工作区、Git worktree 与媒体预览:侧边栏直接切 worktree,文件树和会话上下文瞬间跟上;代码高亮、Markdown(含 KaTeX 公式、Mermaid 图)、PDF、DOCX、音频、图片灯箱预览。
  • 可视化 MCP 与 Skill 中心:双模式 MCP 编辑器(可视化表单 + 原生 JSON),内置 Python stdio / NPX stdio / Remote HTTP / Brave Search / PostgreSQL / GitHub / Fetch 模板;Skill 市场扫本地 .omp/skills,还能经 skills.sh 在线搜、一键安装更新;omp plugin 模块可视化启停升级。
  • 模型与 OMP 原生设置:可视化模型矩阵直接改 ~/.omp/agent/models.yml,换 provider、测连通性;Advisor 策略、命令审批、Bash 执行模式、思考深度、压缩算法、记忆、自动学习都在 UI 里调;常用 slash 命令(/goal、/plan、/terminal、/theme、/mcp、/review、/fix、/test、/explain)一键直达。
  • 主题工作室:18+ 预设主题加 6 套动态流体主题,字体、字号、动效全可调,跟随系统 prefers-reduced-motion;⌘K / Ctrl+K 命令面板;英文/简体中文/日文三语,自动跟系统语言。

手机遥控是架构里最有野心的一块。远程运行时走 WS 协议 v1,配 24 小时变更账本和 SQLite 日志 + 设备注册表——手机断网重连,状态能从账本接着走;客户端用 HMAC-SHA256 质询证明做身份,不裸奔。目标场景很具体:宿舍跑着长任务,你去上课,手机上看一眼会话状态、暂停/继续一个 PTY、瞄一眼遥测面板。这块功能还在推进中,但架构位置已经留好,不是事后打补丁。

质量门也写进了脚本:450+ 单测(npm test)、TypeScript 检查、ESLint、npm run release:check 一键全检。仓库 877 个 commit、13 个 release、MIT 许可,上游脉络来自 pi-web / oh-my-pi 生态。

结果

三个权衡,作者都没藏着:

  • 架构会变厚。 加了 host daemon 之后调试面变大——UI、Next、host、omp 四层,出问题要逐层看。这是 local-first 的代价:Rust 守护进程把延迟压下来了,但你要为四层架构的调试面买单。
  • 写路径必须窄。 能展示的都展示,能写的只给四个低风险操作。这是作者有意设的边界——UI 里什么都想写,早晚和 live 进程打架。
  • 默认安全不能妥协。 loopback 默认、密码门、路径白名单,文档和默认安全必须跟上功能。

它没有发明新 Agent。它只是把已经存在的 omp 会话,放到了一张你真的能用的桌子上——而且这张桌子,你出门也能从手机上瞥一眼。

npx @37chengshan/ompweb@latest

主仓库:37chengshan/ompweb。

现在就能动手

十分钟,把这张桌子摆起来:

  1. 先看再装。 去仓库 Releases 页看截图(Light/Dark 双主题),确认这是你要的”桌子”再动手——别为装而装。
  2. 一行跑起来。 npx @37chengshan/ompweb@latest(需要 Node ≥ 22.19 和本机装好 omp),浏览器自动打开 http://127.0.0.1:30177。先别改任何配置,看看你昨天的会话长什么样。
  3. 试三次核心操作。 在会话树里找一个旧会话:① 点进历史拐点「Continue from here」开分支;② 把它归档再看 ~/.omp/agent/sessions/ 下的文件变化;③ 开一个 Web PTY 跑 ls,感受真 shell 的补全和颜色。
  4. 接上你的生态。 MCP 中心检查已有 server 状态,用模板加一个 Brave Search;Skill 市场扫一遍本地 skill;模型矩阵里换一次 provider 并点”测试连通性”。
  5. 上服务器/想远程时再加锁。 --password 设强密码、--hostname 只绑可信内网 IP,默认 loopback 别急着改。记住:UI 永远只是展示和编排,会话权威在 OMP。

常见问题

ompweb 是要替代 omp 吗?

不是。作者明确说不是想换掉 omp,而是想要一张”桌子”。ompweb 不重写 Agent,只读它的会话文件;live 执行仍然走 omp --mode rpc-ui,站在 omp 旁边而不是对面。

它怎么读到我的会话的?

~/.omp/agent/sessions/ 是唯一会话权威:本地历史用 Node 直接扫 JSONL(Rust 守护进程做头窗口流式索引,目标 15ms 内出结果),live 工作走 omp --mode rpc-ui(stdio 上的 NDJSON)。一句话:OMP 写会话,ompweb 展示和编排。

用它改会话内容安全吗?

写路径被故意做得很窄,只保留 rename / archive / delete / branch-parent 这类低风险操作。什么都想写,就会和 live 进程打架——这是作者有意设的边界。数据主权原则下,它也不引入第二套数据存储、不存 API key。

怎么跑起来?要什么环境?

Web 版一行命令:npx @37chengshan/ompweb@latest,默认监听 127.0.0.1:30177(需要 Node ≥ 22.19 和本机装好 omp);也有桌面安装包(mac / Windows / Linux)和 npm run dev 本地开发模式(30178 端口)。技术栈是 Next.js 16 + Electron 44 + Rust 守护进程,MIT 许可。

能在服务器上远程用吗?手机呢?

服务器可以:--password、--hostname、--no-open 三个 flag 就是为它准备的,默认只走 loopback。手机遥控走安全 WebSocket(HMAC-SHA256 质询证明)+ WS 协议 v1 + 24 小时变更账本,断网重连能从账本接着走——架构位置已留好,功能还在推进中。

加了 Rust 守护进程,调试会不会变复杂?

会。UI、Next、host、omp 四层,出问题要逐层看。这是 local-first 的代价:Rust 把 Git diff、PTY、会话扫描这些重活的延迟和内存安全管好了,但调试面变厚了。作者把质量门写进脚本(450+ 单测、release:check 一键全检)来对冲。

本篇的 X 速览版

① 钩子:终端里的 omp 够用,但不好用——昨天会话靠 ls 翻 JSONL 找,三个分支靠三个窗口人肉排,MCP 挂了翻配置才知道。缺的不是功能,是张桌子。

② ompweb 就是这张桌子:不重写 Agent,只读 ~/.omp/agent/sessions/。设计上只有一条硬规矩——OMP 写会话,ompweb 只做展示和编排,会话权威永远在 OMP 那边。

③ 架构四层:客户端(浏览器/Electron/手机)→ Next.js Web 服务 → Rust 守护进程 ompweb-host → omp 运行时。重活(Git/PTY/会话扫描/进程监督)全下沉到 Rust,Node 只管 API 和渲染。

④ 写路径故意窄:只给 rename / archive / delete / branch-parent 四个低风险操作。什么都想写,早晚和 live 进程打架。SDK 边界也守死:OMP SDK 是 Bun-only,Node 服务不许直接 import。

⑤ 功能按工作台铺:会话树”Continue from here”任意拐点开分支、Web PTY 真 shell(8 并发上限/30 分钟空闲回收)、计划看板、子 agent 呼吸灯监控、MCP 可视化编辑器、Skill 市场一键装。

⑥ 安全是默认配置:loopback 默认绑定、密码门走签名 Cookie、路径白名单沙箱、不引入第二套数据存储、不存 API key。数据主权:一切状态认你本机的 omp。

⑦ 手机遥控:安全 WebSocket + HMAC-SHA256 质询证明 + 24 小时变更账本,断网重连从账本接着走。宿舍跑长任务,去上课也能瞥一眼进度——架构位置已留好,功能推进中。

⑧ 权衡没藏着:四层架构调试面变厚(UI/Next/host/omp 逐层看),这是 local-first 的代价;对冲手段是 450+ 单测和 release:check 一键全检。

⑨ 动手:npx @37chengshan/ompweb@latest(Node ≥22.19 + 本机有 omp),先看昨天会话长啥样,再试分支/归档/PTY 三连。远程时再加 --password。全文:https://citygenius-blog.pages.dev/article/project-ompweb