YMRwithNoworry/dsh-nushell-only ↗★ 0

dsh-nushell-only

Nushell-only shell executor and Nushell syntax teaching for DeepSeek Harness (dsh 0.1.5-rc.2): every ctx.shell execution runs as `nu --no-config-file -c`, other shells are refused, and the model is taught Nushell. 适合统一命令风格的团队环境,需保证仅有一个 shell 提供器并安装可用 Nushell。

パッケージ
dsh-nushell-only
互換性
未検証
Harness ピア範囲
^0.1.5-rc.2
Cordis ピア範囲
^4.0.2
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/09/13

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:YMRwithNoworry/dsh-nushell-only

ドキュメント

README 全文を読む ↗

配置

补丁层默认配置(cordis.patch.yml):

- id: nushell-executor
  name: dsh-nushell-only/executor
  config:
    timeoutMs: 60000
    maxTimeoutMs: 600000
    maxOutputBytes: 64000
    graceMs: 3000
    enforceNushellOnly: true   # 拒绝把命令交给别的 shell
    requireNu: true            # 找不到 nu 就启动失败(而不是每次调用都失败)
    verifyNu: true             # 启动时跑一次 `nu --version`

- id: nushell-teaching
  name: dsh-nushell-only/teaching
  config:
    guide: full                # full | compact | off
    rules: true
    rewriteToolDescriptions: true

执行器可选项:

字段默认含义
nuPath$DSH_NU_PATH → nuNushell 可执行文件;优先级:本字段 > 环境变量 > PATH
nuArgs['--no-config-file','-c']argv 前缀,命令追加在最后
enforceNushellOnlytrue守卫开关
foreignShellAllowlist[]整条命令匹配的正则(字符串),命中则放行
requireNutrue无法解析 nu 时启动即失败
verifyNu / verifyTimeoutMstrue / 10000启动探测 nu --version 及其超时

cwd、timeoutMs、maxTimeoutMs、maxOutputBytes、maxSpillBytes、graceMs 沿用 dsh 自己的 shell 设置命名空间,settings.yaml 的 shell: 段仍然可以热改预算。

在本 profile 的 cordis.patch.yml 里按 id 覆盖即可,例如:

- id: nushell-executor
  config:
    nuPath: 'C:\Users\me\AppData\Local\Programs\nu\bin\nu.exe'
    enforceNushellOnly: false