dsh-zen-remote
移动端界面重排与配对码认证网关插件 适合需要通过手机远程访问、安装PWA并接收Web推送的用户。
同名包的其他仓库
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:KyoMio/dsh-zen-remote说明文档
阅读完整 README ↗Optional configuration
Environment variables, or ~/.dsh/lan-gate.config.json (keys are the variable names minus the prefix, camelCased — port, trustedProxies; an explicit env var wins). Restart dsh web after changing anything.
| Variable | Default | What it does |
|---|---|---|
LAN_GATE_PORT | 3088 | Gateway port; if taken it retries upward (up to +20) |
LAN_GATE_HOST | 127.0.0.1 | Listen address; only open this up when the proxy is on another machine |
LAN_GATE_TARGET_PORT | 3080 | Local DSH Web UI port |
LAN_GATE_RATE_LIMIT | 120 | Per-minute cap on unpaired requests, counted per real client IP |
LAN_GATE_TRUSTED_PROXIES | empty | Comma-separated IPs; required when the proxy is on another machine |
LAN_GATE_VAPID_SUBJECT | mailto:admin@localhost | Push contact. On iOS this must be a real email or https URL, or Apple refuses to deliver |
LAN_GATE_LANG | auto | Language of the pairing page, the admin page and the push opt-in card. auto follows the browser's Accept-Language (falling back to Chinese when there is none); zh/en pin it |
DSH_PUSH_TURN_END | off | Set 1 to also push when a turn ends. Off by default — a finished turn doesn't mean you're needed (it pushed by default before 1.0.3; this was a behaviour change). Approval-pending and question-pending notifications are unaffected and always fire |
DSH_PUSH_EVENTS | agent/turn-stopping | Which events count as "turn ended", comma-separated; only meaningful with DSH_PUSH_TURN_END=1 |
DSH_PUSH_DEBOUNCE_MS | 15000 | Minimum gap between two automatic pushes; approval/question notifications are never suppressed by it |
DSH_PUSH_SUMMARY | off | Set 1 to include this turn's final reply (prose only, never the reasoning; clipped to 120 chars) and the question text |
DSH_PUSH_TOOL | on | Set 0 to remove the model-callable push_notify tool |
DSH_PUSH_LANG | zh | Language of the notification copy. A notification carries no signal about who will read it, and the host process has no reliable system locale either (launchd starts it without LANG), so this is not autodetected: set en for English |
DSH_PUSH_APPROVAL_GRACE_MS | 5000 | How long to wait before pushing "approval pending". With a plugin that answers approvals automatically (dsh-auto-approve and the like) installed, the push waits for its verdict — answered means no push. A slower judge still gets pushed over, so raise this if yours is |
The upload size limit (20MB by default) is config.maxUploadBytes on the plugin row.
To enable turn-process folding on desktop too (it only applies at phone widths by default), set config.turnFoldDesktop to true on the plugin row — that is, add this to the profile's cordis.patch.yml:
- id: dsh-zen-remote
config:
turnFoldDesktop: true
Restart dsh web afterwards. Without touching the server config, a single browser can also turn it on for itself by visiting ?mobile-nav-turn-fold=1 once (=0 turns it off; remembered per browser).
Three calibration values for the soft-keyboard lift. On a few phones the system never tells the browser how tall the keyboard is (measured: certain third-party IMEs plus Chrome; the PWA shell Xiaomi's browser installs). With no measurable signal at all, the plugin has to lift the input box by estimate. The estimate is tuned to one reported device, so it may be too high or too low on yours — all three numbers are adjustable on the plugin row:
| Setting | Default | Meaning | Allowed range |
|---|---|---|---|
keyboardLiftRatio | 0.42 | Estimate the lift as this fraction of screen height | 0 – 1 |
keyboardLiftMaxPx | 400 | Cap on the estimate (pixels), so the input box doesn't end up mid-screen on a tall phone | 0 – 2000 |
keyboardSafetyPadPx | 15 | A little extra clearance above the keyboard, Android only. Third-party IMEs routinely under-report their own height (leaving out the toolbar strip above the keys); this makes up for it | 0 – 200 |
- id: dsh-zen-remote
config:
keyboardLiftRatio: 0.45
keyboardSafetyPadPx: 30
How to tune: if the box is lifted too little (the keyboard still covers part of it), raise keyboardLiftRatio in steps of 0.03; if it's lifted too far (a gap opens between the box and the keyboard), lower it. If it's off by only a little (tens of pixels, on Android), reach for keyboardSafetyPadPx first. Leaving all three unset keeps today's behaviour exactly; out-of-range values are clamped to the table above, so the input box can never be pushed off-screen. Phones that report properly take the measured path and none of these values affect them.