voyager
Nagi-ovo
Enhancement suite for Gemini, AI Studio, Claude & ChatGPT — plus a prompt manager for any web UI, DeepSeek Harness included. / 面向 Gemini、AI Studio、Claude 与 ChatGPT 的增强套件;提示词管理器可用于任意 Web UI,含 DeepSeek Harness。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Cheng-xiu/dsh-mobile-link
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
一键让手机通过互联网连接本机 DeepSeek Harness(DSH),并把手机链接自动推送到你的微信(或你选择的其它渠道)。
One-click phone access to your local DeepSeek Harness: a Cloudflare quick tunnel exposes the DSH Web GUI to the internet, and the phone link is pushed to your WeChat through the notification channel you choose.
bin\start-mobile.cmd(Windows)或 bin/start-mobile.sh(macOS/Linux),或命令行运行 node bin/cli.js start。dsh web --trusted-host <隧道主机名> 启动 DSH,树内自动模式则把隧道主机名动态加入信任栅栏,手机打开不会遇到 403。POST JSON {title, content, url},接入你自己的通道)autoSend 后,每次 dsh web 启动约 8 秒后自动完成隧道 + 推送手机链接。install.cmd。SCT... 的密钥,粘贴给向导。~/.dsh/mobile-link/config.json,询问是否立即启动并推送手机链接。也可在 PowerShell 指定 profile、端口和自动推送:
.\\install.ps1 -Profile web -Port 3080 -AutoSend
SendKey 只保存在用户本机,安装脚本不会把它写入仓库或日志。Server酱免费额度有限,以其官网当前说明为准。安装后目标 DSH profile 必须重启一次,插件才会进入启动树。
commander由插件作为运行时依赖自行安装,避免全新 profile 或独立DSH_HOME中出现ERR_MODULE_NOT_FOUND;@deepseek-ai/schemastery仍为可选 peer,仅供树内配置 schema 使用。
前置要求:已安装 dsh CLI(DeepSeek Harness)、Node.js >= 18.17,且 pnpm 在 PATH 中(dsh plugin 依赖它完成安装,找不到会报 pnpm not found on PATH)。
本插件尚未发布到 npm,请从本地路径或 GitHub 安装:
# 从 GitHub 仓库安装
dsh plugin --profile web add github:Cheng-xiu/dsh-mobile-link
# 或从本地路径安装
dsh plugin --profile web add C:\path\to\dsh-mobile-link
插件会在下一次 dsh 启动时生效——安装完成后需要重启
dsh web(重启会短暂断开当前会话,属正常现象)。
若 pnpm 提示需要为构建脚本授权(pnpm 10+),按提示把该包加入 profile 的
pnpm-workspace.yaml的allowBuilds后重试。本插件是纯 JavaScript,无原生构建。
dsh plugin是 pnpm 转发器:add后面的参数会原样传给 pnpm,因此dsh plugin --profile web --help显示的是 pnpm 的帮助;spec 支持 npm 包名、github:owner/repo、git+https://...git、file:/path、link:/path等形式。
见上节。重启 dsh web 让插件注入前端运行时。
交互式向导(推荐):
node bin/cli.js setup
或非交互配置(示例为 Server酱):
node bin/cli.js setup --channel serverchan --key SCTxxxxxxxxxxxxxxxx --port 3080
凭证保存在本机 ~/.dsh/mobile-link/config.json(权限 0600),不会离开你的机器,也永远不会写进仓库或日志。
双击 bin\start-mobile.cmd(Windows)或运行 bin/start-mobile.sh(macOS/Linux),等价于:
node bin/cli.js start
控制台会依次完成:确保隧道 → 启动 DSH Web(带 --trusted-host)→ 等待 Web 就绪 → 推送手机链接。你的微信(或所选渠道)会收到一条「[DSH 已启动] 手机链接」,点开即可在手机上使用 DSH。
node bin/cli.js setup --auto
之后每次 dsh web 启动约 8 秒后会自动完成隧道与推送,无需任何操作。
独立 CLI(node bin/cli.js <命令>):
| 命令 | 说明 | 参数 |
|---|---|---|
start |
一键:隧道 → 启动 DSH Web(带 --trusted-host)→ 推送链接 |
--port <p> --profile <name> --test --dry-run |
send |
只推送(复用已有隧道,无则新建) | --test --dry-run --port <p> |
setup |
配置渠道与凭证(交互式,也可纯参数) | --channel --key --token --device-key --topic --url --ntfy-server --ntfy-token --port --auto --no-auto |
tunnel |
只管理隧道,打印手机 URL | --port <p> --stop |
doctor |
环境诊断(cloudflared、端口、渠道连通性) | — |
status |
隧道与配置状态 | — |
常用示例:
node bin/cli.js start # 一键启动 + 推送
node bin/cli.js start --dry-run # 只打印将发送的内容,不真正推送
node bin/cli.js start --test # 发送测试消息而非真实链接
node bin/cli.js send --port 3099 # 只推送,指定端口
node bin/cli.js tunnel --stop # 停止本插件管理的隧道
node bin/cli.js status # 查看隧道与配置状态
node bin/cli.js doctor # 环境诊断
start / send / tunnel / setup 默认端口取配置 config.json 的 webPort(缺省 3080),都可用 --port <p> 覆盖。
~/.dsh/mobile-link/config.json:
{
"channel": "serverchan",
"serverchan": { "sendKey": "SCT..." },
"pushplus": { "token": "" },
"bark": { "deviceKey": "", "server": "" },
"ntfy": { "topic": "", "server": "", "token": "" },
"custom": { "url": "", "headers": {} },
"autoSend": false,
"webPort": 3080
}
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
channel |
string | serverchan |
当前渠道:serverchan |
serverchan.sendKey |
string | "" |
Server酱 SendKey(形如 SCT...) |
pushplus.token |
string | "" |
PushPlus token |
bark.deviceKey |
string | "" |
Bark device key |
bark.server |
string | "" |
Bark 自建服务器地址(空则用官方) |
ntfy.topic |
string | "" |
ntfy topic |
ntfy.server |
string | "" |
ntfy 服务器(空则用 https://ntfy.sh) |
ntfy.token |
string | "" |
ntfy access token(可选) |
custom.url |
string | "" |
自定义 webhook URL |
custom.headers |
object | {} |
自定义 webhook 额外请求头 |
autoSend |
boolean | false |
dsh web 启动后自动隧道 + 推送 |
webPort |
number | 3080 |
隧道转发的 DSH Web 端口 |
SCT...),--channel serverchan --key <SendKey>。--channel pushplus --token <token>。--channel bark --device-key <key>。--channel ntfy --topic <topic>。--channel custom --url <webhook-url>,会收到 POST JSON {title, content, url}。插件在 dsh web 进程内注册了一个自动模式(cordis 插件行 mobile-link,无命令行界面)。当 config.json 的 autoSend 为 true(或在 dsh 配置里开启 autoSend)时,dsh web 启动约 8 秒后自动执行与 start 相同的流程:确保隧道 → 把隧道主机名动态加入 /api 信任栅栏 → 等待 Web 就绪 → 推送手机链接。
node bin/cli.js setup --auto,或把 config.json 的 autoSend 改为 true。autoSendDelayMs 调整(默认 8000 毫秒)。DSH_MOBILE_LINK_DRY_RUN=1:只打印将发送的内容,不真正推送。DSH_MOBILE_LINK_TEST=1:发送测试消息而非真实链接。--dry-run / --test 标志优先于这两个环境变量。~/.dsh/mobile-link/bin/(Windows 为 cloudflared.exe)。CLOUDFLARED_BASE 环境变量可覆盖下载源前缀(如内网镜像 CLOUDFLARED_BASE=https://mirror.example.com/cloudflared),缺省用官方 releases/latest/download。~/.cloudflared 等)已有 cloudflared 时优先复用,不重复下载。~/.dsh/mobile-link/tunnel-state.json,下次同端口调用会复用仍在运行的隧道;日志按端口分文件(cloudflared-<port>.log)。status 会识别为「已收养」并可被 tunnel --stop 停止;但无法读取其 URL(日志不是本插件写的),send 会另起新隧道。start / send 会复用或新建隧道后直接推送,而不会重复启动 DSH。--trusted-host 放行,手机访问 /api 可能被信任栅栏拦截(403)。建议关闭现有实例后重新用 start 启动(会自动带 --trusted-host)。start / send 会打印具体的主机名对比与解决指引。更省心的做法是 node bin/cli.js setup --auto 开启树内自动模式:每次 dsh web 启动后会自动把当前隧道主机名加入信任栅栏并推送,之后只要重启 dsh 即可自愈。~/.dsh/mobile-link/config.json(0600)。Q: cloudflared 下载失败 / 网络受限?
先确认能访问 GitHub。需要走代理或内网镜像时,设置 CLOUDFLARED_BASE 指向可用的下载前缀,或手动安装 cloudflared 并加入 PATH(本插件会优先复用)。
Q: 双击脚本后端口提示被占用 / 已有 DSH 实例? 如果已有旧 DSH 实例在运行,它会缺少本插件动态放行的隧道主机名。关闭旧实例后重新双击即可。
Q: 手机打开后界面异常 / 接口 403?
确认使用的是本插件推送的最新链接(隧道 URL 每次重启都变);确认 DSH Web 是由 start 启动的(自带 --trusted-host)。
Q: 微信收不到推送?
运行 node bin/cli.js doctor 检查渠道凭证与网络;注意 Server酱等渠道有每日免费额度上限。
Q: 想换渠道?
重新运行 node bin/cli.js setup 即可,凭证覆盖保存。
Q: 我有多个 DSH 实例 / 想用别的端口?
一份 ~/.dsh/mobile-link/config.json 同时只支持一个 webPort。多个实例请分别为各 profile 安装插件,并用 node bin/cli.js setup --port <端口> 修改 webPort 后重启对应实例。
bin/cli.js,自己 spawn dsh web --trusted-host <host>)+ 树内自动模式(index.js cordis 插件行,仅自动推送)。树内不注册任何 dsh web <subcommand> 命令行——这是为避免与 dsh web-startup 的参数快照解析冲突而作出的取舍,所以所有交互命令都走独立 CLI。bin/cli.js(CLI)、index.js(cordis 插件)、cordis.patch.yml(bundle patch,只插入 mobile-link 插件行)。@deepseek-ai/schemastery ^3.18.0 与 commander ^12 || ^13 || ^14 || ^15。index.js 的 Config(webPort / autoSend / autoSendDelayMs);渠道凭证存 ~/.dsh/mobile-link/config.json。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: wechat。