dsh-nu

DSH PLUGIN会话与消息

仓库 ryan4yin/dsh-nu

会话与消息 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件
安装这个插件

dsh-nu 是 ryan4yin 维护的 会话与消息 类 DSH 可安装插件, 仓库为 ryan4yin/dsh-nu。 下面按「装什么、怎么装、验没验过、跑起来要注意什么」逐项列出。

一句话选型结论

按资料字段整理

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

分类会话与消息 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 2 复刻 0 · 未关闭 issue 0
最近更新 2026-10-29 创建于 2026-10-18
README 11.7 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:ryan4yin/dsh-nu
  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 查看包信息

能做什么

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

上游标签

agentdeepseek-harnessdshdsh-pluginnushellshell

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

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

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

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

更适合

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

不太适合

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

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-nu当前 未做沙盒验证 未标注 2 未标注 有
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 未标注 无

仓库档案

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

README 全文

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

dsh-nu

English | 中文

dsh-nu forces DeepSeek Harness to run every shell command in Nushell, with the bash / pwsh executors disabled. It does three things:

  • Swap the executor: Through the low-level extension point DeepSeek Harness exposes, it replaces the bash / pwsh executor with a Nushell executor at runtime (commands run as nu --no-config-file -c ""). dsh still sees the same bash / pwsh tool with the same calling convention, so the Nushell executor plugs into dsh and stays compatible with every other plugin and feature. The oddity is cosmetic: the model calls a tool named bash / pwsh and passes it Nushell script.
  • Teach the model: It adds a short Nushell rules section and syntax guide to the system prompt. That teaching text costs some context but matters: with it turned off, the model hits frequent errors when calling the shell tool.
  • Refuse handoffs: When a Nushell command hands work to another shell, the guard refuses it before a process starts. Bash and PowerShell syntax that Nushell rejects or silently misreads is refused by the syntax rules, with the Nushell spelling in the error.

Status

0.7.0 is published on npm. dsh 0.2.2-alpha.2 and Nushell 0.116.1 are the tested pair, recorded in package.json under testedWith.

Compatibility

dsh-nu supports only that pair. The peer ranges cover the dsh family, and boot logs a warning if the installed dsh or Nushell differs. Other versions have not been tested.

Install

Requires Node 24.9+, pnpm on PATH (the dsh plugin installer runs it), dsh 0.2.2-alpha.2, and Nushell 0.116.1 on PATH.

Add the bundle to a dsh profile:

dsh plugin --profile tui add dsh-nu@0.7.0

Use --profile web for the browser app. The first dsh plugin call creates the profile; the bundle's patch disables the platform shell executors, mounts the Nushell executor and teaching layer, and re-mounts the shell tool with a Nushell description. Start the profile with dsh tui (or dsh web).

If pnpm reports ERR_PNPM_NO_MATURE_MATCHING_VERSION for a fresh release, it is applying minimumReleaseAge. Wait for the cutoff, or add --config.minimumReleaseAge=0 to the same command.

Development

The repository ships a flake with the tested Node and Nushell versions:

nix develop

Inside the shell, or with your own Node 24 and Nushell 0.116.1:

npm install
node dev/link-peers.mjs --root
npm run typecheck
npm test
npm run build

dev/link-peers.mjs links the dsh peer packages into node_modules, so the tests can drive the real seams without publishing.

The suite runs on Node 24. The package requires Node 24.9 and newer.

Real-model teaching evals are separate from npm test; see eval/README.md for the three-arm harness, cross-model judging, and the dated results.

Nix

dsh-nu does not package dsh itself. This flake builds the plugin from the checkout, and the dsh installation comes from a flake that packages it. The complete example below uses nur-ryan4yin, whose dsh also provides the withPlugins wrapper that applies bundle patches:

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# dsh itself, plus its withPlugins wrapper.
nur-ryan4yin = {
url = "github:ryan4yin/nur-packages";
inputs.nixpkgs.follows = "nixpkgs";
};
# The bundle, built from this repository's flake. Its nixpkgs is not
# followed: that pin supplies the tested Nushell.
dsh-nu.url = "github:ryan4yin/dsh-nu";
};

outputs = { self, nixpkgs, nur-ryan4yin, dsh-nu }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};

# dsh from nur-ryan4yin; withPlugins applies the bundle patch.
dsh = nur-ryan4yin.packages.${system}.dsh;
dshWithNu = dsh.withPlugins [
(dsh-nu.lib.mkDshNuPackage { inherit pkgs dsh; })
];
in {
packages.${system}.default = dshWithNu;

# Install `dshWithNu` wherever dsh would go, for example:
#   environment.systemPackages = [ dshWithNu ];
#   home.packages = [ dshWithNu ];
};
}

nix build produces that dsh binary. mkDshNuPackage needs only the dsh installation's @deepseek-ai peer packages, so llm-agents.nix's dsh works there too; applying the bundle still needs a wrapper that adds --patch, which nur-ryan4yin's withPlugins provides. Bump the bundle with nix flake update dsh-nu.

Configuration

The bundle's patch mounts the shell executor, the shell tool row (nu-tool-bash on POSIX, nu-tool-pwsh on Windows), and the teaching layer. A profile patch overrides any of them by id. This profile patch spells out every field and its default:

- id: nu-executor
name: dsh-nu/executor
config:
nuPath: ""
nuArgs: ["--no-config-file", "-c"]
timeoutMs: 60000
enforceNushellOnly: true
syntaxLint: true
syntaxHints: true
requireNu: true
verifyNu: true
verifyTimeoutMs: 10000
foreignShellAllowlist: []

- id: nu-tool-bash       # nu-tool-pwsh on Windows
name: dsh-nu/tool-bash
config:
rewriteToolDescriptions: true
enableRunInBackground: true
promoteOnTimeout: true

- id: nu-teaching
name: dsh-nu/teaching
config:
guide: full          # full | compact | off
rules: true
rewriteToolDescriptions: true
Field Default Meaning
nuPath $DSH_NU_PATH, then nu Nushell executable: field, then environment, then PATH
nuArgs ["--no-config-file","-c"] Argv prefix; the command is appended last, so it must end with -c or --commands
enforceNushellOnly true Refuse handing the command to another shell
foreignShellAllowlist [] Regexes exempt from both preflight checks; each must match the whole command
syntaxLint true Refuse bash/PowerShell syntax before spawning
syntaxHints true Append one Nushell hint (…) for a recognized failure or deprecation warning, including exit 0
guide full Prompt guide: full, compact, or off
rules true Prepend the shell-rules section
rewriteToolDescriptions (shell tool) true Replace the shell claims in the bash / pwsh tool description, keeping the host's own contract text
enableRunInBackground / promoteOnTimeout (shell tool) true / true dsh's own tool-bash / tool-pwsh settings, passed through unchanged
rewriteToolDescriptions (teaching) true Replace the same shell claims in the generated PTC tools:sdk section
timeoutMs 60000 Default per-call timeout; maxTimeoutMs caps overrides
requireNu / verifyNu true / true Fail boot when nu cannot be resolved, reports no version, or cannot run the preflight
verifyTimeoutMs 10000 Bound for that probe

Both checks read Nushell's parser through two read-only probes on a private temporary script. Boot runs a token and diagnostic canary once when verifyNu is on and either check is enabled: with requireNu (the default) a failure fails boot, and with requireNu: false each call is refused instead of running without the check (fail closed). The error names enforceNushellOnly: false and syntaxLint: false as the escape hatches and points at the tested Nushell version.

Choose the guide by goal:

  • off disables the guide only; the rules stay on unless rules: false. It is a diagnostic baseline: the eval recorded many preflight refusals and extra retries, so do not use it in normal sessions.
  • compact covers the common idioms and uses fewer prompt tokens. It handled most eval samples without a refusal.
  • full keeps the detailed syntax reference for uncommon syntax and edge cases.

Sandbox budgets (cwd, timeoutMs, …) stay on the nu-executor row, not in dsh's shared shell settings namespace. Override any row by id in the profile's own cordis.patch.yml. examples/preset-nu-shell.md lists the preset-level shell bypasses to disable.

The shell tool rows run dsh's own bash / pwsh tool and change only the description it registers, so the tool name, arguments, and results are dsh's. dsh's settings for its tool-bash / tool-pwsh rows go on nu-tool-bash / nu-tool-pwsh. Native function calls and dsh's PTC executor read the same registered description, so switching a profile to PTC needs no dsh-nu setting.

What "only Nushell" does not cover

The guard is not a sandbox: it checks command positions it can read, and everything else is out of reach.

  • A shell name inside a plain quoted string is data, not a command position: 'bash -c "echo hi"' evaluates to a string, it does not run bash. $"…" and $'…' interpolate, so each parenthesized expression inside one is inspected as code; quoted text inside it stays data.
  • A literal nu -c '' or nu -e '' is inspected recursively, up to four levels. A script value built at run time is not inspected.
  • A Nushell script file is not read: nu script.nu, source, and use load code the guard never sees, so a handoff written into a file and run that way is out of reach.
  • A shell name computed at run time, or a program that starts a shell itself (a language runtime, an editor), is out of reach. The guard follows literal shell names, a fixed launcher table (including nix shell / nix develop --command and nix run), run-external, and literal nu -c scripts.
  • A tool that runs its own argument text is out of scope on purpose: hyperfine, watch, make, npm run, and git hooks are not shell handoffs, so the guard allows them even though they may start sh internally. Refusing them would break the tools rather than keep the deployment Nu-only. When the command you pass to one of them is Nushell, name the shell: hyperfine -S nu 'ls | length', hyperfine -N 'rg foo' (no shell at all), or watch -x rg foo. Nushell cannot be the shell watch starts by itself, so watch 'a && b' runs bash, not Nushell.
  • A preset row that spawns its own shell, such as a custom plugin calling ctx.subprocess.spawn directly or a PTY persistent-shell group. Disable it for a Nu-only deployment; see examples/preset-nu-shell.md.
  • Other shell seams. Hook bridges, persistent terminals, and tmux context use their own services or scripts and are outside this bundle. Keep them off for a strict deployment.
  • dsh-nu does not change sandbox behaviour: danger-full-access runs directly, and confined modes wrap the Nushell argv through ctx.sandbox.confine() with the same mode / denied / enforcement reporting.
  • The preflight's parser probes (nu --ide-ast and nu --ide-check) run outside the sandbox, before the command. They parse the command without running it, but a file named by source or use is read from disk to be parsed; its contents are not returned to the model.

Documentation

  • Why a Nushell-only shell
  • Troubleshooting
  • Verification
  • Nushell friction review
  • Distribution and support (ADR)
  • Parser-based preflight (ADR)
  • Glossary

License

MIT. See LICENSE.

Acknowledgements

The Nushell-only shell, guard, and teaching ideas in this project come from
YMRwithNoworry/dsh-nushell-only (MIT),
the original implementation of those ideas.

Thanks to the DeepSeek Harness project for the
shell seam this bundle extends.

常见问题

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

在 DSH 里执行 `dsh plugin --profile web add github:ryan4yin/dsh-nu` 即可。

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

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-nu 安全吗?

未标注。

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

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

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

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 星

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