只读的 Windows 设备信息工具:每个 Win32 设备类别一个 agent 工具(时间、系统、CPU、内存、磁盘、GPU、网络、电池、进程、USB、音频、打印机),基于 WMI/CIM 与 Node os 采集。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:lsz-asd/dsh-plugin-device-info
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Read-only Windows device info for DeepSeek Harness agents �?12 win_* tools, one per Win32 device category.
@huanlin/dsh-plugin-device-info gives the model structured, read-only access to the host machine: time, system, CPU, memory, disk, GPU, network/WiFi, battery, processes, USB, audio, printers. No writes, no installs, no network.
Why this plugin
Ad-hoc PowerShell probing costs tokens every query �?the model re-generates a command each time (~40�?00+ tokens, more with retries after a typo or a permission prompt). A plugin call is ~6 tokens against pre-tested, versioned queries. Install once, call any tool; no command-writing, no trial-and-error. (Estimates: scripts/token-estimate.mjs; real benchmark planned, see Roadmap.)
Install
dsh plugin --profile <profile> add github:lsz-asd/dsh-plugin-device-info # after publishing
dsh plugin --profile <profile> add link:C:/path/to/dsh-device-info # local checkout
Restart the profile. lib/ ships pre-built (no prepare script).
Tools
| Tool | Reports | Source |
|---|---|---|
win_time |
ISO/epoch time, IANA timezone, UTC offset, uptime, boot time | Node os �?any platform |
win_system |
OS, hostname, user, vendor, model, BIOS, serial (config) | Win32_ComputerSystem / Win32_OperatingSystem / Win32_BIOS |
win_cpu |
Model, cores, max clock, load % | Win32_Processor |
win_memory |
Used/free/total, used %, modules | Node os + Win32_PhysicalMemory |
win_disk |
Drives + volumes (capacity, free) | Win32_DiskDrive / Win32_LogicalDisk |
win_gpu |
Name, VRAM, driver, resolution | Win32_VideoController |
win_network |
Adapters, IPs, live WiFi (SSID/signal/rates/auth) | Get-NetAdapter + netsh wlan + Node os |
win_battery |
Charge %, AC/DC, runtime, power scheme | Win32_Battery + powercfg |
win_processes |
Count + top-N by memory/CPU (top_n, sort_by) |
Get-Process |
win_usb |
USB devices | Win32_PnPEntity |
win_audio |
Audio devices | Win32_SoundDevice |
win_printers |
Printers (driver/port/default/offline) | Win32_Printer |
Config
| Field | Default | Description |
|---|---|---|
pwshEnabled |
true |
Master switch; false disables all but win_time. |
pwshTimeoutMs |
8000 |
Per-query timeout (1000�?0000). |
topProcesses |
10 |
Default top-N for win_processes (1�?00). |
includeSerialNumber |
true |
Report BIOS serial in win_system. |
pwshPath |
powershell.exe |
PowerShell executable (powershell.exe/pwsh.exe). |
Example
User: 这台电脑还剩多少内存?电池呢�?Model: [win_memory] �?72.8% used, 2× Samsung 8 GB DDR5-4800
[win_battery] �?100%, AC online, scheme 381b4222�?(平衡)
All tools return canonical JSON; nullable fields stay null (schema oneOf: [type, null]) for a stable shape:
{ "supported": true, "platform": "win32",
"name": "13th Gen Intel(R) Core(TM) i7-13700HX",
"cores": 16, "logical_processors": 24,
"max_clock_mhz": 2100, "current_load_percent": 3 }
Architecture
model ──tools──�?win_* tools ──�?execute �?canonical JSON value
�? render �?pure text projection
�? CollectContext {run, signal, platform, config}
�? Node os (no subprocess) PowerShell child (WMI/CIM · netsh · powercfg)
win_time, totals, addresses killed on exec.signal · hard timeout
src/index.ts entry · src/tools.ts 12 tools + renders · src/collect.ts collectors · src/pwsh.ts runner + parsers · src/types.d.ts ambient peer types
Highlights
- Value/render split �?execute returns plain bytes/ms/percents; render is a pure projection, replay-safe
- Locale-independent parsing �?
netsh wlanfields stay English on localized Windows;powercfgGUID regex language-independent; CIM/Date(ms)/�?ISO-8601 - Sentinel handling �?battery runtime is junk on AC (
0x04444444) �?null;AdapterRAMuint32 wraparound documented - Cancellation/timeouts �?
exec.signalkills the child; hard per-query timeout; no orphans, no hangs - Domain vs infra failures �?missing battery/WiFi/non-Windows �?
supported: falsevalues; spawn/timeout/abort �?thrown (isError)
Quality
59 unit tests (real-machine fixtures) · real powershell.exe smoke · real-composition smoke through production @deepseek-ai/dsh-tools (scripts/di-smoke.mjs) · strict TS, tsc + tsdown �?lib/.
Development
pnpm install && pnpm run typecheck && pnpm test && pnpm run build
@deepseek-ai/dsh-tools is host-provided and not in devDependencies (its peer chain references an unpublished package); typecheck uses src/types.d.ts ambient declarations, tests mock the module, the real module runs in the smoke script/Loader.
Model Experience
The 12 fixed schemas join the generated tool catalog �?no dynamic prompt injection. Token effect: fixed (constant schemas; one result message per call). KV cache: prefix-stable (schemas never change at runtime).
Roadmap
- Token-efficiency benchmark �?real per-task usage: plugin call vs ad-hoc commands (incl. retries/prompts); results published here
- More platforms �?Linux/macOS (
/proc,sysctl,system_profiler) - More categories �?Bluetooth, displays, traffic stats, temperature (LibreHardwareMonitor), installed software
Known limitations
Sensors need a third-party daemon · Bluetooth/display/traffic stats deferred · process CPU is cumulative seconds, not live rate · only win_time on non-Windows.
License
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 30675
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 3596
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1126
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
gitroomhq/postiz-agent#dsh-postiz★ 496
通过 MCP 将 DeepSeek Harness 连接到 Postiz:列出已连接的社交媒体渠道、获取各平台发帖规则,并向 X、LinkedIn、Instagram、Facebook、Threads、TikTok、YouTube、Reddit、Bluesky、Mastodon、Discord、Slack、Telegram 等平台排期、存草稿或发布帖子;附带 postiz 工作流技能。
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 446
面向 DeepSeek Harness 的本地 IMAP 发票下载、OCR 识别、归档与 Excel 报销汇总。
anysearch-team/anysearch-dsh★ 430
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。