New:Socket for Asana Is Now Available.Learn more
Get Started

dsh-lan-mobile

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

dsh-lan-mobile

DeepSeek Harness bundle: serve the Web GUI on the LAN and adapt the frontend for phones — LAN bind switch, insecure-origin crypto polyfill, and a mobile navigation frame.

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

dsh-lan-mobile

English | 中文

A DeepSeek Harness bundle that serves the Web GUI on your LAN and adapts the frontend for phones.

  • LAN serving — one flag (dsh --profile web --lan) binds the web server to all interfaces; the /api browser-trust fence automatically accepts every LAN literal. No firewall, no config surgery.
  • Insecure-origin fix — phones reach the GUI over plain http://<lan-ip>:3080, which is not a secure context: crypto.randomUUID does not exist there and every RPC crashed with crypto.randomUUID is not a function. This bundle installs a getRandomValues-based polyfill before anything mints an id, on top of the upstream fix.
  • Phone-first layout — replaces the stock three-column frame with an adaptive frame: desktop keeps the identical three columns; below 768 px you get a bottom-tab shell (Sessions / Chat / Details), a full-screen details page, safe-area insets, and a touch-friendly navigation.
  • PWA-readyviewport-fit=cover for notched screens and a theme-color meta driven by the active theme; add the page to your home screen for an app-like experience.

Install

From a DSH checkout or installation:

dsh plugin --profile web add dsh-lan-mobile

The @deepseek-ai/* runtime pieces (cordis, dsh-cmdline, dsh-client-runtime, …) and react come from the DSH installation itself (in-box bundles / platform modules) — this package declares only commander as an installable dependency, so the registry dependency chain stays intact.

Then boot with LAN serving:

dsh --profile web --lan

Open http://127.0.0.1:3080 locally, or http://<this-machine-lan-ip>:3080 from any phone on the same network.

--lan-only <cidr> (e.g. --lan-only 192.168.0.0/24) declares the intended LAN scope for documentation; the bind currently serves every interface, so treat the LAN as trusted.

How it works

The bundle contributes one patch layer (cordis.patch.yml). The stock web-startup rejects unknown options and the stock ui-layout owns the root layout exclusively, so both rows are disabled and one dsh-lan-mobile row (host half + client half) takes over:

RowChange
web-startupdisabled — its flags are parsed by dsh-lan-mobile's startup instead
dsh-lan-mobileinserted: parses --host/--port/--trusted-host plus --lan/--lan-only (unknown options pass through), provides the webStartup + lanStartup services, prints LAN URLs once the server binds
webserverbind host resolves to 0.0.0.0 only when --lan is passed; otherwise the deployment default (127.0.0.1)
ui-layoutdisabled — the client half of dsh-lan-mobile registers the adaptive frame into root with the same child slots (sidebar / conversation / details / shell.overlay), so ui-sidebar and ui-conversation register unchanged

The client half (browser bundle) installs the crypto.randomUUID polyfill (insecure-origin LAN serving), patches the mobile viewport (viewport-fit=cover, no double-tap zoom), projects the theme (theme-color), provides ctx.layout (the same toggleSidebar / openDetails / closeDetails face other plugins use), and renders the adaptive frame: the stock three columns on desktop, bottom-tab navigation with a full-screen details page below 768 px.

Development

pnpm install
pnpm build        # tsc + tsdown: lib/*.js host half, lib/client.js browser bundle
pnpm typecheck
pnpm test

Test against a checkout without touching your real profile — copy the web profile, add this bundle, boot with --lan:

# one-time: create a throwaway profile
mkdir -p "$DSH_HOME/profiles/lan-test"   # $DSH_HOME defaults to ~/.dsh
# package.json: { "dependencies": { "dsh-lan-mobile": "link:/path/to/dsh-lan-mobile" },
#                 "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-lan-mobile"] } } }
# cordis.patch.yml: []

pnpm --dir "$DSH_HOME/profiles/lan-test" install
node --import tsx/esm apps/cli/src/bin.ts --profile lan-test --lan --port 3099

Or overlay the patch directly on the web profile without installing:

node --import tsx/esm apps/cli/src/bin.ts --profile web --patch /path/to/dsh-lan-mobile/cordis.patch.yml --lan --port 3099

⚠️ Multi-instance warning: every dsh web process appends to the shared $DSH_HOME session logs. When testing, give each test instance its own home (DSH_HOME=/tmp/dsh-test-home ...) so concurrent instances never write the same session log — and never point a second instance at a home whose sessions are actively being written by another one.

Repairing a corrupted session log

DSH's interrupt-recovery can occasionally replay already-committed sequence numbers, leaving a session log with a duplicated seq range that fails to load (corrupt session log: seq gap in committed region). The tools/ scripts in this repository repair such a log: decompress the zstd frames, drop rows whose seq falls back to an already-seen value, and re-encode. A .corrupt-backup of the original is kept next to the file.

License

MIT. Desktop layout, store, and theme-presenter code are derived from @deepseek-ai/dsh-client-ui-layout (MIT).

Keywords

deepseek-harness

FAQs

Package last updated on 14 Aug 2026

Related posts