DeepSeek Harness plugin

dsh-lan-sparkwei

DSH bundle: expose the Web GUI on the LAN (bind 0.0.0.0) and add a deepseek/balance RPC that queries the official DeepSeek balance with the PC-side credential

Jump to install

Source facts

Repository
SparkWeiyang/dsh-lan
Latest update
Aug 16, 2026
Category
UI Enhancements
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/SparkWeiyang/dsh-lan
Plugin: dsh-lan-sparkwei
Author: SparkWeiyang

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-lan

DeepSeek Harness (DSH) 的局域网开放插件。一个 bundle 提供两个能力:

1. 局域网开放:把 Web GUI 绑定到 0.0.0.0dsh-web-app 自动枚举所有 IPv4 地址作为浏览器信任栅栏白名单,无需任何补丁或启动参数。 2. deepseek/balance RPC:用 PC 端已配置的 DEEPSEEK_API_KEY 凭证查询 DeepSeek 官方账户余额(GET https://api.deepseek.com/user/balance),密钥永不出 PC,手机等远程客户端直接调用即可。

> 仓库:https://github.com/SparkWeiyang/dsh-lan · topic: dsh-plugin

安装

# 从 npm(若已发布)
dsh plugin --profile web add dsh-lan

# 或从本地目录
dsh plugin --profile web add file:../dsh-lan

然后把 dsh-lan 加入 web profile 的 bundle 列表(必须在 @deepseek-ai/dsh-web-app 之后)。 编辑 $DSH_HOME/profiles/web/package.json

{
  "dsh": {
    "profile": {
      "bundles": [
        "@deepseek-ai/dsh-base",
        "@deepseek-ai/dsh-web-app",
        "dsh-lan"
      ]
    }
  }
}

使用

dsh web              # 绑定 0.0.0.0:3080,局域网可访问
dsh web --port 8080  # 换端口

启动后 web-runtime 会打印局域网 URL(如 (LAN: http://192.168.x.x:3080))。

余额查询 RPC

客户端向 harness 发送标准 RPC 信封(Typert 端点约定 payload.args):

{
  "type": "client-request",
  "rpcId": "uuid",
  "method": "deepseek/balance",
  "payload": { "args": {} }
}

响应 result.value 即 DeepSeek 官方余额:

{
  "is_available": true,
  "balance_infos": [
    { "currency": "CNY", "total_balance": "8.27", "granted_balance": "0.00", "topped_up_balance": "8.27" }
  ]
}

PC 端凭证未配置时返回 internal 错误(DEEPSEEK_API_KEY credential is not configured)。

原理

  • bundle patch(cordis.patch.yml):覆盖 webserverhost: 0.0.0.0(端口仍随 --port 可调),并插入 deepseek-service 行加载本插件。
  • 运行时插件(lib/index.js):一个 TypertRemoteService 子类(serviceKey=deepseek@Remote('balance')),以 SRC 模式注册端点 deepseek/balance;实现内用 ctx.credentials.resolve('DEEPSEEK_API_KEY') 取得 PC 端凭证后调用官方接口。

安全警告

DSH Web carrier 没有鉴权层(信任栅栏只是可达性策略)。绑定 0.0.0.0 后,同网段任何人都可驱动会话执行命令。请仅在可信网络暴露,或在前面加反向代理 + 认证。