rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:rainfish-home/dsh-mobi-web
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A phone-first web client for DeepSeek Harness, served by a sidecar gateway that runs inside the harness process.
Not
dsh-mobile-gateway. There is an unrelated npm package by that name ("scan a QR code + settings page + live sync"). This one is different: a 32 KB page instead of a proxied UI, approvals that stay on the phone when the phone started the turn, and Mermaid rendered on the device. Package, repo and checkout directory are alldsh-mobi-web.
phone browser ──HTTPS──▶ Cloudflare tunnel / Tailscale ──▶ 127.0.0.1:3083 (this plugin) ──▶ harness host services
Holding the login token means operating this machine through the harness. The gateway proxies the whole harness, not just chat:
So: put it behind Tailscale (a private tailnet) rather than a public tunnel unless you know what you are doing, use a token you generated for this and nothing else, and never reuse a password from another service. The token is stored in $DSH_HOME/dsh-mobi-web-token (mode 0600) and the log prints only its path.

Sessions grouped by workspace, the running one marked, anything older than 24 h folded away, archived ones hidden.

A conversation: Markdown, a Mermaid diagram rendered on the device, and an approval card waiting at the bottom — the one the desktop never sees, because the phone started this turn.
The official web UI ships ~4.6 MB of JavaScript. Over a relayed mobile link (0.4 MB/s in practice) that is ten-plus seconds of white screen, and the layout assumes a trackpad. This gateway serves a ~32 KB page instead and talks to the same host services in-process, so it can do things a proxied UI cannot — like holding an approval the desktop never sees.
Browse
SessionSummary.updatedAt the desktop orders by)Read
Do
+ on the workspace header)Approve
Stay up
The plugin is a DSH bundle: it ships its own cordis.patch.yml, so no profile file is edited by hand. There are two install paths, because the desktop profile is special.
Web / other profiles — the npm CLI:
dsh plugin --profile web add dsh-mobi-web # from npm
dsh plugin --profile web add link:/path/to/dsh-mobi-web # from a checkout
link:records an absolute path. It is meant for a throwaway development profile, not for the profile your phone talks to: if you move the checkout, the link dangles, the bundle silently stops mounting, and/m/disappears with no error. Re-run theaddafter a move. For an unpublished build on your daily profile,npm packand install the tarball — that is a copy, not a link.
The desktop profile — desktop is reserved for the Electron-owned profile, and the npm CLI refuses to manage it. Install through the app's plugin manager, or with the Desktop-installed command (dsh inside the app bundle):
dsh plugin --profile desktop add dsh-mobi-web
Either way, after add the package is in package.json → dsh.profile.bundles (the CLI reconciles that list by inspecting each dependency's dsh.bundle declaration). A new bundle only mounts on restart — adding it changes nothing until the app or dsh starts again.
Then expose the port:
tailscale serve --bg 3083 # phone on the same tailnet
# or a Cloudflare tunnel ingress: host → http://127.0.0.1:3083
Open https://<your-host>/m/.
The password. If you do not set token in the patch config, one is minted on first start and written to $DSH_HOME/dsh-mobi-web-token (mode 0600). The startup log prints where it is, not the token itself — cat that file to read it. (The token is echoed only when the file could not be written, i.e. when that process holds the only copy.) Set token: '…' to choose your own, or token: false to disable the gate — only on a network you fully trust.
To override anything, add a row to your profile's cordis.patch.yml. A patch replaces the row's whole config object, so restate every non-default value:
- id: dsh-mobi-web
config:
listenHost: '127.0.0.1'
listenPort: 3083
blockPaths: ['/dsh-whale/']
| key | default | meaning |
|---|---|---|
listenHost |
127.0.0.1 |
never bind wider; a tunnel does the rest |
listenPort |
3083 (bundle patch; the code default is 3080) |
|
token |
auto-minted file | password for the cookie gate; false disables it |
allowTokenUrl |
false |
accept ?t=… links (leaks via history, off by default) |
blockPaths |
[] |
path prefixes answered 204 to keep the page light |
approvalPriority |
'phone-first' |
'desktop' disables interception entirely |
pwa |
true |
inject manifest + icon into the proxied UI |
brotli |
true |
recompress JS for the proxied UI |
| route | what |
|---|---|
GET /m/ |
the mobile page (cookie-gated) |
GET /m/api/sessions |
workspace-grouped list (10 s cache) |
GET /m/api/session?id= |
messages (newest 40 / 120 k chars) + pending approvals |
GET /m/api/events?session= |
SSE: state, message, astart, adelta, aend, tool, approval, approval-done |
POST /m/api/prompt |
{id, text, images[], requestId?} — admits the message (queue mode); the same requestId on a retry is deduplicated |
POST /m/api/cancel |
interrupt the running turn |
POST /m/api/create |
{cwd} → new session |
POST /m/api/approve |
{id, decision} |
GET /__gw/health |
unauthenticated liveness |
GET /__gw/stats |
counters + approval diagnostics (cookie-gated) |
0.0.0.0. dsh refuses to start on a non-loopback host, so a sidecar proxy is the only option; the tunnel terminates TLS outside.303 dropped the SameSite=Strict cookie on iOS, producing ERR_TOO_MANY_REDIRECTS.sessionController.create({cwd}) creates a Session with that directory but does not join a Workspace; the desktop then shows it under “Ungrouped” even though its cwd matches. The phone's + resolves the directory through workspaceRegistry.resolveByPath() and passes workspaceId instead.sessionController.prompt() resolves once the Agent has taken the message into its inbox. While another turn is running, the message waits in inbox.nextTurn and only becomes a user/message event when that turn ends — possibly minutes later. The gateway trusts that admission instead of polling the transcript (which used to reject correctly queued messages), and the page sends a retry key so a lost response cannot queue a second copy.lib/index.js and restarting is the deploy; lib/page.html is read per request, so it needs no restart at all.[图片] — only the fact they existed is kept.cwd at creation. The phone's + resolves the directory to its Workspace before creating, so new Sessions land in the right group; Sessions created cwd-only by older builds can be repaired with node scripts/attach-sessions.mjs --list while the app is quit.0.2.2-rc.1. The gateway reads host services through ctx.get('sessionQuery') and friends — private API, not a stable contract. A dsh upgrade may break it; the page and the HTTP layer would keep working.lib/index.js the gateway plugin (single file on purpose)
lib/page.html the mobile page, served from disk on every request
assets/ vendored mermaid (js + gz + br) and the app icon
cordis.patch.yml bundle patch — the install declaration
test/ 48 tests, fake host services, no network
node --test test/*.test.mjs # 48 tests, no network, fake host services CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。