yhuan416/dsh-remote-agent ↗★ 0

dsh-remote-agent

发布进程启动凭证与身份,免去手动粘贴Token 适合需要将多个后端节点安全、便捷地接入Hub端统一管理的用户。

包名
dsh-remote-agent
兼容性
待验证
版本
0.1.0
许可证
MIT
最近更新
2026年10月19日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yhuan416/dsh-remote-agent

dsh-remote-agent

English | 中文

Deployment guide (Chinese): dsh-remote-hub/docs/DEPLOY.zh.md

Agent-side DSH host plugin, installed on every backend a hub should reach.

It publishes this process's launch token + identity to $DSH_HOME/remote-agent.json (0600, atomic write) and removes the file on shutdown. The token is generated per process and never persisted by dsh itself, so this file is the clean way for a hub to mint the browser cookie without scraping journalctl.

{
  "version": 1,
  "hostname": "yhuan-n100",
  "pid": 1234,
  "startedAt": 1792400000000,
  "updatedAt": 1792400000000,
  "token": "",
  "webPort": 3080,
  "dshHome": "/home/yhuan/.dsh"
}

Install

# 1) place the package where the profile can resolve it
mkdir -p ~/.dsh/plugins
tar xzf dsh-remote-agent.tgz -C ~/.dsh/plugins
ln -sfn ~/.dsh/plugins/dsh-remote-agent ~/.dsh/profiles/node_modules/dsh-remote-agent
ln -sfn ~/.dsh/plugins/dsh-remote-agent ~/.dsh/profiles/web/node_modules/dsh-remote-agent

# 2) append to ~/.dsh/profiles/web/cordis.patch.yml
# - insert:
#     - id: remote-agent
#       name: dsh-remote-agent

# 3) restart dsh web; then check
cat ~/.dsh/remote-agent.json

Optional config: { file: "/custom/path/remote-agent.json" }.

Hub side pairs with tokenFile: { kind: ssh, host, user, path: ~/.dsh/remote-agent.json }.