npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-plugin-mobile-link

v0.3.1

Published

Put your PC's DeepSeek Harness in your pocket: dials a relay over WSS so the native iOS client reaches this machine even without a public IP.

Readme

dsh-plugin-mobile-link

DSH plugin listed in awesome-deepseek-harness npm License: MIT

面向:使用者与实现者 · 状态:stable · 最近核对:2026-09-20

The computer half of DSH Mobile: it dials a relay over WSS, so the native iOS client reaches this DSH instance even though the computer has no public IP.

iPhone App ──WSS──▶ Relay(公网,只鉴权与转发)──WSS──▶ this plugin ──HTTP+WS──▶ 127.0.0.1:<port>

The connector always talks to the local DSH as 127.0.0.1:<port>, so the host's authority and its trust fence are unaffected: no --trusted-host, no rewritten Host, no new listening port on this machine.

plugins/mobile-link/
├── package.json          # type: module, dsh.bundle.patch, bin: dsh-mobile-link
├── cordis.patch.yml      # bundle patch: the loader row + config reference
├── lib/
│   ├── index.js          # cordis plugin: starts the agent, registers 3 routes
│   ├── link.js           # the DLP agent transport: identity, socket, heartbeat, reconnect
│   ├── router.js         # frames ⇄ local DSH mux streams, per-device `$events`
│   ├── dlp.js            # DLP v1 frame codec (shared with the relay)
│   ├── files.js          # phone → computer file transfers (`_link/file*` methods)
│   ├── enroll.js         # invite-code redemption, writes ~/.dsh/mobile-link/agent.json
│   ├── routes.js         # GET /mobile-link/status, POST /pair-code, GET /qr
│   ├── qr.js             # dependency-free QR SVG
│   └── cli.js            # dsh-mobile-link: enroll / mint-pair-code
└── test/                 # node --test, 100+ tests (no DSH, no network)

Install

dsh plugin --profile web add dsh-plugin-mobile-link

Then restart DSH (or reload the profile). From a checkout the same command takes a path — the leading ./ matters, because DSH anchors a relative spec against your current directory instead of resolving it inside the profile:

dsh plugin --profile web add ./plugins/mobile-link

Use

  1. Register this computer with a relay (once). Either redeem an invite code:

    dsh-mobile-link enroll --invite <邀请码> --relay wss://<你的站点>/dsh-link

    …or register it on the relay host with relay/admin.py agent-register --write-config ~/.dsh/mobile-link/agent.json.

  2. Mint a pairing code, and show it as a QR the phone camera can read:

    dsh-mobile-link --mint-pair-code        # prints JSON: code + relay + agentId

    Or open /mobile-link/qr on the local DSH (behind DSH's own authentication).

  3. Scan it in the iOS app. After that the phone reconnects on its own — nothing else has to be run by hand.

GET /mobile-link/status reports whether the link is up, which devices are attached, and whether this computer is registered yet.

Configuration

All optional; the defaults are what a stock deployment needs. Set them in the plugin's config block (cordis.patch.yml), not by editing this file.

| Key | Default | Meaning | | --- | --- | --- | | enabled | true | false stops the outbound link without uninstalling | | relayUrl | from agent.json | Relay base URL; a bare deployment dials <relay>/link/agent | | agentId / agentSecret | from agent.json | Override the enrolled identity | | stateFile | ~/.dsh/mobile-link/agent.json | Where the identity lives | | dshUrl | discovery | Explicit local DSH base URL | | endpointFile | $DSH_HOME/desktop-shell/endpoint.json | DSH endpoint handoff file | | heartbeatMs | 20000 | DLP ping interval |

Address resolution order: this config block, then DSH_RELAY_URL (or DSH_MOBILE_LINK_RELAY), then the enrolled identity file, then the repository placeholder wss://relay.example.com/dsh-link — the placeholder being the "nothing configured yet" sentinel rather than a real address.

Design notes

  • No required services. inject is empty and the routes are attached through ctx.inject([...]), so a future DSH that renames or drops webServer / connection cannot make the tunnel fatal on boot.
  • Protocol-transparent. Nothing outside lib/ is imported and no DSH business API is touched: the connector forwards frames, it does not interpret sessions. The relay has the same property.
  • Disable by removing the row from the profile's cordis.patch.yml, or by setting enabled: false.

Test

cd plugins/mobile-link && npm test    # zero dependencies

The wire protocol is specified in docs/RELAY-PROTOCOL.md.

MIT.