Complete mobile PWA for DSH, built on dsh-mobile-gate: secure remote-access gateway plus install-to-homescreen (manifest + service worker), offline capability, touch gestures (pull-to-refresh, edge-swipe back, pinch-zoom font), agent-done push notifications, and touch-first layout — desktop unaffected.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:zylzyqzz/dsh-mobile-pwa
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Turn DeepSeek Harness (DSH) into a complete mobile PWA: secure remote access to your own DSH server + install-to-homescreen standalone app + offline capability + touch gestures + agent-done push notifications.
Built on the MIT dsh-mobile-gate secure-gateway base, with PWA differentiation.
Features
| Module | What |
|---|---|
| 📡 Secure remote access | Isolated child-process gateway. First-visit approval on the host, one-time token per device, per-IP rate limiting. DSH stays 127.0.0.1-only; the /api trust fence is untouched |
| 📱 Real PWA | manifest.json + service worker → install to homescreen as a standalone full-screen app with icon, splash, theme-color, maskable assets |
| 🌐 Offline | SW: shell assets cache-first, API network-first with cache fallback, offline fallback page |
| 👆 Touch gestures | Pull-to-refresh, edge-swipe back, pinch-to-resize font (resettable) |
| 🔔 Agent-done push | Web Push when the agent finishes a turn, even when the phone shows another app (opt-in) |
| 📐 Touch layout | 44px targets, safe-area, full-screen dialogs, compact type, horizontal-scrolling code — desktop never affected |
| 🔒 Desktop unaffected | Every rule is rooted at html[data-lan-device="phone"] or an @media(max-width:820px) that excludes data-lan-device="desktop" |
Architecture
Phone ──> gateway (isolated Node child · 0.0.0.0:3088)
├─ not approved -> "waiting host approval" page (polls /lan-gate/admin)
├─ approved + token -> reverse proxy to DSH Web UI (127.0.0.1:3080)
│ └─ HTML injected: manifest link + PWA bootstrap + touch CSS + randomUUID polyfill
├─ /pwa/* -> serves manifest / sw.js / app.css / icons / offline.html
├─ /pwa/push/* -> subscribe & send agent-done notifications
└─ over rate -> 429 page
Host 127.0.0.1:3088/lan-gate/admin -> approve / deny / revoke devices, pick access mode (phone/desktop/auto)
Quick start (on your own DSH server)
git clone https://github.com/<you>/dsh-mobile-pwa.git
cd dsh-mobile-pwa
dsh plugin --profile web add ./dsh-mobile-pwa
Or static-mount via cordis.patch.yml.example.
Env config
LAN_GATE_PORT (3088) · LAN_GATE_HOST (0.0.0.0) · LAN_GATE_TARGET_PORT (3080) · LAN_GATE_RATE_LIMIT (120) · LAN_GATE_VAPID_PUBLICKEY (empty, for push).
Flow
- Start DSH + this plugin → sees
[lan-gate] listening on 0.0.0.0:3088 -> 127.0.0.1:3080 (pwa=on). - Phone → open
http://<your-ip>:3088→ "waiting approval". - On the host → open
http://127.0.0.1:3088/lan-gate/admin→ approve the device, pick phone. - Phone → refresh → DSH UI, PWA-injected.
- Browser menu → Add to Home Screen → standalone app.
- (Optional) enable agent-done notifications from the injected hint.
Test locally
npm test # boots a mock upstream, asserts /pwa assets, HTML injection, status
Layout
lan-gate.mjs (Cordis entry) · dsh-push.mjs (optional push host plugin) · lib/lan-gate-server.cjs (zero-dep gateway) · pwa/ (manifest, sw.js, inject.js, touch-gestures.js, app.css, offline.html, icons) · cordis.patch.yml(.example) · test/
See AGENTS.md for development conventions (do not break isolation / CSS prefix rules / stable selectors).
Security
Installing a plugin runs third-party code with your own permissions. Run only on your own server, keep credentials away, and audit lib/lan-gate-server.cjs changes. Always use approval + tokens for remote access; never expose the gateway port raw on the public internet.
License
MIT. The gateway lib/lan-gate-server.cjs extends dsh-mobile-gate; original MIT copyright/license retained — see LICENSE.
Links
More in this category
zhu1090093659/dsh-web-ui#packages/dsh-web-ui-all★ 2622
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 1231
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 1198
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-at-file★ 214
Codex-style `@file` mentions: search workspace files in the composer and attach their contents to prompts.
huiliyi37/dsh-tianshu-tui★ 159
A terminal UI (TUI) for DeepSeek Harness.
Nagi-ovo/dsh-visualize★ 114
In-conversation generative UI: the model renders interactive HTML cards into the chat stream, with streaming preview and sandboxed rendering.