shudingbo/dsh-plugin-autosshfs ↗★ 0

@shudingbo/dsh-plugin-autosshfs

Manage sshfs mounts and unmounts from a dedicated DeepSeek Harness main panel, and expose the same operations to the agent as the autosshfs tool.

패키지
@shudingbo/dsh-plugin-autosshfs
호환성
미검증
버전
1.0.3
라이선스
MIT
최근 업데이트
2026. 11. 5.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:shudingbo/dsh-plugin-autosshfs

配置文件

默认 ~/.autosshfs.json,也可用环境变量 AUTOSSHFS_CONFIG 指定(两者都支持 ~ 展开)。 结构:

{
  "list": [
    {
      "enable": true,
      "name": "project",
      "host": "example.com",
      "port": 22,
      "user": "me",
      "password": "",
      "IdentityFile": "~/.ssh/id_ed25519",
      "remotePath": "/srv/project",
      "mount": "/mnt/project",
      "allowOther": true,
      "uid": "1000",
      "gid": "1000",
      "extraOptions": ["reconnect", "ServerAliveInterval=15"]
    }
  ]
}

字段说明:

字段说明
name名称,界面与工具按它定位配置项;新建时会校验唯一性。历史配置若存在同名项,界面按「位置 + 名称」定位,不会误改到另一项
host / port / userSSH 目标,user 为空时使用当前本地用户
password可选;存在时用 -o password_stdin 通过 stdin 传入。明文保存在配置文件中,不建议长期使用,优先 IdentityFile / ssh-agent
IdentityFile私钥路径,支持 ~/
remotePath远端目录
mount本地挂载点(绝对路径,不存在会自动创建)
enable是否参与「全部挂载」;缺省视为 false,与命令行版的 mount 循环一致
allowOther是否附加 allow_other(默认 true);Linux 非 root 需要 user_allow_other,macOS 失败会自动退回
uid / gid透传 uid= / gid=
extraOptions额外 -o 选项,数组或以逗号/空格分隔的字符串

未识别的字段在保存时会原样保留,方便手工扩展。

使用

界面

左侧栏面板按钮 → 主界面独立页面(整列空间,不是设置弹窗;可用面板行的固定按钮收进「更多」):

  • 顶栏:标题、sshfs 版本徽标、已挂载/总数 徽标、配置文件路径,以及刷新 / 全部挂载 / 全部卸载 / 新增挂载四个操作。
  • 依赖提示条:存在依赖问题(错误或警告)时出现,一键跳到「使用帮助」。
  • 「挂载列表」页:搜索框(按名称 / 主机 / 挂载点过滤)、全部 / 已启用 / 已挂载三个筛选项、 计数;每条记录显示名称、状态徽标(已挂载 / 未挂载 / 已禁用 / 已存密码)、 user@host:remotePath、挂载点,以及挂载/卸载、启用开关、详情、编辑、删除(二次确认)。 点击「详情」就地展开挂载来源、文件系统、挂载选项、认证方式。
  • 新增/编辑:居中弹层对话框,分「连接信息」「挂载选项」两组;Esc 或点击遮罩关闭; 校验失败会标红对应字段;未修改的密码不会被上传(留空 = 保持不变)。
  • 「使用帮助」页:快速上手三步、系统依赖状态表(可「重新检测」/「自动安装」)、 Linux 与 macOS 安装命令、user_allow_other 开关命令、配置文件示例与字段说明、 Agent 调用示例、5 条常见问题、与命令行版共存说明。
  • 操作结果(每个配置项的成败、失败原因、警告)显示在结果卡片里,便于排查。
  • 界面全中文/英文双语,随 Harness 语言切换。
  • 控件样式直接对齐 @deepseek-ai/dsh-client-ui-primitives:按钮用 ghost/outline/primary 三档 (primary 的底色与前景色取 --dsw-alias-button-primary-fill / --dsw-alias-label-primary-foreground 配对),开关用 --dsw-alias-brand-primary + --dsw-alias-switch-thumb,因此深色 / 浅色主题下 文字都清晰可见。

Agent 工具

// 列出现状
{ "action": "state" }
// 挂载全部启用的配置
{ "action": "mount" }
// 只挂载某一项
{ "action": "mount", "name": "project" }
// 新增配置
{ "action": "add", "entry": { "name": "p", "host": "h", "user": "me", "remotePath": "/srv", "mount": "/mnt/p" } }
// 修改(只传要改的字段,password 省略=保持,传 ""=清除)
{ "action": "update", "name": "p", "entry": { "allowOther": false } }
// 同名配置项可改用位置定位(位置上的 name 不匹配时会退回按名称查找)
{ "action": "detail", "index": 4 }
// 查看依赖问题(自动安装只在界面上提供:它会改动机器权限)
{ "action": "check" }

返回值是 JSON:{ ok, action, data | error, summary },error.code / 结果项 code 是稳定标识, hint / command 给出下一步可执行动作。