dsh-pwsh-fast

DSH PLUGIN会话与消息

仓库 Yebeimu/dsh-pwsh-fast

会话与消息 L4 · 沙盒安装通过 安全审查:低风险 可信度:银 可安装插件
安装这个插件

每次工具调用少等约四秒:Windows 上跳过 DSH 钩子的 pwsh 包装

一句话选型结论

按资料字段整理

dsh-pwsh-fast 是会话与消息类的 DSH 可安装插件,验证等级 L4 · 沙盒安装通过,安全审查为低风险,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类会话与消息 收录类型可安装插件 验证等级L4 · 沙盒安装通过 安全审查低风险
验证等级 L4 L4 · 沙盒安装通过
GitHub 星标 0 复刻 未标注 · 未关闭 issue 未标注
最近更新 2026-10-23 创建于 未标注
README 8.7 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:Yebeimu/dsh-pwsh-fast
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

会话与消息
字段来自项目仓库与公开索引,中文说明由本站标注

适用场景

终端命令

验证等级与安全审查

L4 · 沙盒安装通过
自动化流程结论,不是人工审核
验证等级L4 · 沙盒安装通过安装命令在隔离沙盒内真实执行成功,无依赖错误
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度银综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L4:在沙盒里真实装过,依赖能装上,不是纸面声明。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在会话与消息场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-pwsh-fast当前 L4 · 沙盒安装通过 低风险 0 未标注 有
dsh-desktop L3 · 安装规范通过 低风险 3.0 万 未标注 无
openpets L4 · 沙盒安装通过 低风险 1,274 未标注 有
deeptide L4 · 沙盒安装通过 低风险 1,104 0.1.1-rc.2 有
jingyun-dsh L3 · 安装规范通过 低风险 1,004 未标注 有
study-mate 未做沙盒验证 未标注 856 未标注 无

仓库档案

会话与消息
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方Yebeimu仓库 dsh-pwsh-fast · 默认分支 未标注
分类会话与消息desktop
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言未标注仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 未标注 / 未标注收录时的数值,非实时
创建 / 更新未标注 · 2026-10-23最后推送 未标注
本站收录2026-10-30首次进入本站目录的时间

README 全文

8.7 KB
作者原文,中文版优先;只做安全转义,不改内容

DSH on Windows:每次工具调用少等四秒

DeepSeek Harness 每次起子进程,都会把命令包成 pwsh -NoLogo -NoProfile -NonInteractive -Command "<命令>"。

钩子是每次工具调用前后自动跑的小脚本,管权限检查、提示注入、删除拦截这些。它们本身只是一条「可执行文件 + 参数」的命令,用不着 shell。这层包装在 Windows 上能让每个钩子多花几秒,而钩子每调一次工具就跑一遍。

插件做的事很简单:命令不需要 shell 时直接交给系统创建进程,其余照旧走 pwsh。装完之后,每次工具调用少等约四秒。

效果

同一台机器、同一个 DSH 版本、同样一串工具调用:

钩子耗时
官方原版 约 4300 ms
装插件后 约 240 ms

钩子每次工具调用都要跑一遍,所以体感差别是每次操作省四秒多。

这两个数只在一种环境测过:Windows 11、DSH 0.2.1-rc.2、单机。你的机器可能不一样,见下面的「先量一下」。

先量一下

装之前先看看你现在有多慢。让它跑一次工具调用(比如让助手改一个文件),掐一下从发出到返回的秒数。

  • 本来就在半秒内:这个插件对你没用,别装。
  • 一两秒以上:值得试。

插件本身是保守的——只有「首 token 是绝对路径、没有 shell 元字符」才直连,其余一律退回原来的 pwsh 路径,命令语义不变。

安装(推荐:插件)

插件不改 app.asar,DSH 升级也不失效。

  1. 把 plugin/index.js 放到:
%USERPROFILE%\.dsh\profiles\desktop\plugins\dsh-pwsh-fast\index.js
  1. 在 %USERPROFILE%\.dsh\profiles\desktop\cordis.patch.yml 末尾加一段(路径里的用户名换成你的):
- insert:
- id: "dsh-pwsh-fast"
name: "file:///C:/Users/<你的用户名>/.dsh/profiles/desktop/plugins/dsh-pwsh-fast/index.js"
  1. 重启 DSH。

想确认有没有生效,把 index.js 里的 DEBUG 改成 true,重启后跑几个工具调用,同目录会出现 pwsh-fast.log,里面会写哪些命令走了直连、哪些退回。

卸载

从 cordis.patch.yml 删掉那一段,重启,就回到原样。app.asar 从头到尾没被改过。

备选:改 app.asar

如果你的 DSH 版本拿不到 PwshLocalExecutor(插件启动时会静默跳过),可以改用 install.py 直接改 app.asar。

python install.py            # 只看,不改
python install.py install    # 备份后安装
python install.py revert     # 从备份恢复

脚本会做这些:

  1. 读目标文件的 SHA-256。与官方原版一致才继续;
  2. 与「已装补丁」的指纹一致就直接退出;
  3. 与两个都不一致,说明 DSH 版本变了,拒绝执行;
  4. 装之前把整个 app.asar 复制成 app.asar.bak-<时间戳>;
  5. 新文件先写成 app.asar.new,校验头部结构,通过才替换。

改 app.asar 前必须先完全退出 DSH,文件被占用时无法替换。

它做了什么

插件和 install.py 改的是同一处逻辑。

文件:dsh/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js

内容:PwshLocalExecutor.prototype.argv(spec) 原本无条件返回 pwsh 包装的 argv。
现在先调一次 splitSimpleCommand(command),切成 argv 就直连;切不了就原样回退。

切不了的情况:

  • 管道、重定向、;、$、反引号、#
  • 换行或回车
  • 弯引号(PowerShell 认、切词器不认)
  • 引号不配对
  • 首 token 不是绝对路径
  • 目标是 .cmd / .bat / .ps1(这些必须经 shell)
  • 参数里带 --%

没有改超时、缓冲区、退出码处理。

已知边界

  • 退出码:直连保留原退出码;经 pwsh 包装时 2 和 7 会被转成 1。DSH 只把 2 当 block 语义、0 当解析 JSON。查过 16041 次钩子调用,exit 2 一次都没出现。
  • 大输出:2000 行完整返回,尾部标记在。
  • 版本绑定:install.py 按文件指纹认版本,DSH 升级后指纹会变,脚本会拒绝执行。插件不绑版本,升级后照常工作。

许可

MIT,见 LICENSE。插件和脚本修改的 @deepseek-ai/dsh-pwsh-local 同样是 MIT(Copyright (c) 2026 DeepSeek),完整声明在 NOTICE。


DSH on Windows: four seconds off every tool call

Every time DeepSeek Harness spawns a process, it wraps the command as pwsh -NoLogo -NoProfile -NonInteractive -Command "".

Hooks are the small scripts that run around every tool call — permission checks, prompt injection, the delete guard. Each one is just an executable plus arguments; it doesn't need a shell. On Windows that wrapper can add seconds to every hook, and a hook runs on every tool call.

This plugin hands such commands straight to the OS and falls back to pwsh for everything else. The result: about four seconds less waiting per tool call.

Powered by DSH — a plugin, not a fork.

Result

Same machine, same DSH version, same sequence of tool calls:

Hook time
Stock DSH ~4300 ms
With plugin ~240 ms

Hooks run on every tool call, so in practice this saves about four seconds per operation.

These numbers were measured in one environment only: Windows 11, DSH 0.2.1-rc.2, single machine. Yours may differ — see "Measure first".

Measure first

Before installing, check how slow you actually are. Run one tool call (ask the assistant to edit a file, for example) and time it from request to response.

  • Under half a second: the plugin won't help you, skip it.
  • A second or more: worth trying.

The plugin is conservative. It only goes direct when the first token is an absolute path and no shell metacharacter is present; everything else returns to the original pwsh path, so command semantics don't change.

Install (plugin, recommended)

The plugin never touches app.asar, so DSH upgrades won't wipe it.

  1. Copy plugin/index.js to:
%USERPROFILE%\.dsh\profiles\desktop\plugins\dsh-pwsh-fast\index.js
  1. Append this to %USERPROFILE%\.dsh\profiles\desktop\cordis.patch.yml, replacing the username:
- insert:
- id: "dsh-pwsh-fast"
name: "file:///C:/Users//.dsh/profiles/desktop/plugins/dsh-pwsh-fast/index.js"
  1. Restart DSH.

To confirm it's active, set DEBUG to true in index.js and restart. After a few tool calls, pwsh-fast.log will appear next to the file, listing which commands went direct and which fell back.

Uninstall

Remove that block from cordis.patch.yml and restart. app.asar was never modified.

Alternative: patch app.asar

If your DSH version doesn't expose PwshLocalExecutor (the plugin exits silently), use install.py instead.

python install.py            # check only
python install.py install    # back up, then patch
python install.py revert     # restore from backup

What the script does:

  1. Reads the SHA-256 of the target file. Proceeds only if it matches the stock build.
  2. Exits immediately if the file already matches the patched fingerprint.
  3. Refuses to run if neither matches — that means DSH was upgraded.
  4. Copies the whole app.asar to app.asar.bak- first.
  5. Writes the new file as app.asar.new, validates the header structure, then swaps it in.

DSH must be fully closed before patching; the file is locked while it runs.

What it changes

The plugin and install.py implement the same logic.

File: dsh/node_modules/@deepseek-ai/dsh-pwsh-local/lib/index.js

PwshLocalExecutor.prototype.argv(spec) originally returned the pwsh-wrapped argv unconditionally. It now calls splitSimpleCommand(command) first: if the command splits into argv, it goes direct; otherwise it falls back unchanged.

When it refuses to go direct:

  • Pipes, redirection, ;, $, backticks, #
  • Newlines or carriage returns
  • Smart quotes (PowerShell treats them as quotes, the tokenizer doesn't)
  • Unbalanced quotes
  • First token is not an absolute path
  • Target is .cmd / .bat / .ps1 (these need a shell)
  • Any argument contains --%

Timeouts, buffers and exit-code handling are untouched.

Known limits

  • Exit codes: direct execution preserves the original code; through pwsh, 2 and 7 are rewritten to 1. DSH only treats 2 as a block signal and 0 as "parse JSON". Across 16,041 hook invocations on the test machine, exit 2 never occurred.
  • Large output: 2,000 lines came back complete, tail marker intact.
  • Version pinning: install.py identifies versions by file fingerprint and refuses to run after a DSH upgrade. The plugin isn't version-bound and keeps working.

License

MIT, see LICENSE. The @deepseek-ai/dsh-pwsh-local package it modifies is MIT as well (Copyright (c) 2026 DeepSeek); the full notice is in NOTICE.

常见问题

5 问
答案由本站依据条目字段整理,不引用上游原文
dsh-pwsh-fast 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:Yebeimu/dsh-pwsh-fast` 即可。

dsh-pwsh-fast 的验证等级是什么意思?

L4 · 沙盒安装通过。安装命令在隔离沙盒内真实执行成功,无依赖错误

dsh-pwsh-fast 安全吗?

低风险。

dsh-pwsh-fast 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-pwsh-fast 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

会话与消息
按星标排序,可作替代方案

dsh-desktop

dsh-desktop

为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。

L3 · 安装规范通过 3.0 万 星

openpets

openpets

L4 · 沙盒安装通过 1,274 星

deeptide

deeptide

L4 · 沙盒安装通过 1,104 星

jingyun-dsh

jingyun-dsh

井云 DSH 客户端插件,为 DeepSeek Harness 注入会员登录、订阅支付、算力管控与应用市场,让智能体和技能快速变成可交易商品

L3 · 安装规范通过 1,004 星

study-mate

study-mate

StudyMate 是 DSH 的「学习模式」预设与技能包,为数学、计算机科目定制学习路线、讲解课件与练习评估,跨科目共享记忆。

未标注验证等级 856 星

Yebeimu 的其它插件

1 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。