DeepSeek Harness Plugin

handelxh/dsh-synology-nas

Stars ★ 0 Downloads (30d) 614 Category Remote & Mobile Added 2026-12-01 npm dsh-synology-nas

Read-only Synology DSM connector: nine NAS tools (status, storage, shares, files, downloads, Docker, health, packages, connection test) plus a dashboard pane with anomaly analysis.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-synology-nas

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:handelxh/dsh-synology-nas

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

This plugin publishes its README in Chinese only.

English | 中文

DeepSeek Harness 插件:通过 DSM Web API 连接群晖 NAS,把系统状态、存储、共享目录、文件浏览、Download Station 任务和套件列表变成模型可以直接调用的工具。只读,不改动 NAS 上的任何数据。

能力

工具 说明
synology_status 型号、DSM 版本、序列号、运行时间、CPU/内存占用、网络吞吐
synology_storage 存储池/卷容量与占用、RAID、磁盘型号/温度/SMART
synology_shares 共享文件夹名称、路径、描述、加密与回收站状态
synology_files list 列目录、info 查属性、search 按文件名递归搜索、md5 计算文件 MD5
synology_downloads Download Station 任务状态、进度、大小
synology_docker Docker 容器名称、镜像与运行状态(需管理员账号)
synology_health 只读健康检查:容量、SMART、温度、RAID、Docker 与系统告警,按 critical / warn / info 列出异常
synology_packages 已安装套件名称、版本、运行状态
synology_test_connection 登录并读取型号/DSM 版本,返回耗时

安装

dsh plugin --profile web add dsh-synology-nas

或从源码装:克隆仓库后在「设置 → 插件 → 从本地目录安装」选择本目录。

界面

安装后有两处可见的 UI:

  1. 设置 → 插件 → 群晖 NAS:连接配置与「测试连接」(密码写入 DSH 凭据库)。
  2. 左侧栏面板列表 → 群晖 NAS:只读仪表盘,展示型号/DSM/序列号/运行时间/温度、CPU 与内存占用、各卷容量进度、共享文件夹数量、Download Station 任务、已装套件清单、Docker 容器状态(点开 OpenVPN 容器可看当前连接的账号、真实 IP、虚拟 IP、连接时间与流量),以及异常分析(容量 ≥80%/90%、SMART 异常、坏道超阈值、磁盘/系统温度、RAID 降级、未运行容器、从未执行 scrub、不在兼容列表的磁盘等,按 critical / warn / info 排序);右上角可刷新,权限不足的接口会在底部列为「部分数据读取失败」而不是整页报错。

模型侧工具(synology_*)与这两处 UI 并存,互不影响。

配置

打开「设置 → 插件 → 群晖 NAS」:

配置 默认 说明
NAS 地址 — 填 IP 或完整地址;裸 IP 自动补 http://IP:5000,HTTPS 用 :5001
DSM 账号 — 群晖登录账号(建议用只读/受限账号)
密码 — 保存时写入 DSH 凭据库(默认 key SYNOLOGY_NAS_PASSWORD),不写入插件配置、日志或对话;页面上只显示"已保存"
两步验证码 空 账号开启 2FA 时填写;仅本次会话内存有效,不落盘
凭据名称 SYNOLOGY_NAS_PASSWORD 凭据库 key;换 key 等于换一份密码
超时 15000 单次 DSM 请求超时(毫秒)
自签证书 开 HTTPS 使用群晖自签证书时保持开启(关闭证书校验)

密码也可以在 DSH 凭据文件里直接维护:把 SYNOLOGY_NAS_PASSWORD 设成 DSM 密码即可,设置页会显示"已保存"。

安全边界

  • 第一版只读:不提供上传、删除、重命名、套件启停、计划任务等写操作。
  • 密码只存在 DSH 凭据库;插件配置、日志、模型上下文都不会出现密码。
  • 建议单独建一个只读 DSM 账号(只授予需要访问的共享文件夹),不要用 admin。
  • DSM 登录失败会按错误码给出提示(400 账号密码错、403/404 两步验证、407 IP 封禁等),但请注意连续失败会触发 DSM 的 IP 自动封禁。

兼容性

以 DSM 6.2.4(DS218+,构建 25556)为主验证;7.x 的 API 路径基本一致,未逐项验证。部分接口需要相应权限,权限不足时工具会返回 DSM 的 105/112 错误而不是崩溃。

开发

node --test test/unit.test.mjs

测试用一个本地假 DSM 服务器覆盖登录、2FA、会话过期重登、目录/搜索/MD5、下载任务与错误码映射,不需要真实 NAS。

English

A read-only DeepSeek Harness connector for Synology NAS. It signs in through the DSM Web API with an account stored in the DSH credential store, and exposes system status, storage, shares, file browsing/search/MD5, Download Station tasks and installed packages as model tools. No write operations in this release.

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.