GuTianshuo/powershell-fix

GuTianshuo★ 1JavaScript最后同步: 2026-08-19

在 GitHub 打开

DeepSeek Harness (DSH) host-layer plugin: detect & auto-fix Windows PowerShell command syntax mistakes (bash constructs, broken continuations, pasted prompts), then execute under the normal sandbox/approval policy

README 摘要

powershell-fix A host-layer plugin for DeepSeek Harness (DSH) that detects and auto-fixes Windows PowerShell command syntax mistakes before they burn a tool-call round-trip — then executes the corrected command through the host shell seam, under the normal sandbox/approval policy . AI agents (and humans) frequently paste bash-flavored commands into a Windows terminal. This plugin gives the agent one tool — powershell fix — that checks, repairs, and runs such commands safely. What it fixes Line hygiene (the most frequent real-world breakage) problem fix CRLF / stray \r from copy-paste normalized to LF pasted shell prompts ( PS C:\ , C:\ , $ on every line) stripped trailing whitespace after a continuation char (invisible breakage) removed bash \ line continuation PowerShell backtick missing continuation before a -Parameter line backtick inserted dangling backtick before an empty line removed unbalanced quotes warned (never blindly rewritten) bash → PowerShell semantics bash PowerShell export NAME=value $env:NAME='value' (same-command $NAME refs rewritten to $env:NAME ) unset NAME if (Test-Path Env:NAME) { Remove-Item Env:NAME } (guarded; inline-in-chain supported) /dev/null , 2 /dev/…

在 GitHub 查看完整 README →
工具/开发deepseek-harnessdsh-pluginpowershellsyntax-checkerterminalagent

分类