T-Auto/dsh-ops
A toolkit for low-level operations in DSH, designed to reduce token usage and task execution time / DSH 底层操作工具插件,旨在减少 Token 消耗与任务耗时
dsh-ops – A Windows‑focused plugin to make AI‑driven DSH shells more efficient
What it is – dsh‑ops is a plugin for the DeepSeek Harness (DSH) platform that bundles a self‑contained bash 5.3.15, PowerShell 7.6.6, and a handful of tiny Rust utilities. Its purpose is to give AI agents (e.g., LLM‑driven code‑generation or data‑analysis bots) a faster, lower‑token‑cost way to run shell commands on Windows x64, avoiding the slower, error‑prone PowerShell 5 that ships with Windows.
Why it matters for AI – When an LLM is used to orchestrate tasks (file search, log parsing, model‑training scripts, etc.) each round‑trip with the model consumes tokens. Shorter, more deterministic command output means fewer tokens and less time spent waiting for the model to parse large JSON payloads. By providing a lightweight bash interpreter and Rust‑based file‑search/replace tools, dsh‑ops reduces the amount of text the model has to read and therefore speeds up the overall workflow.
Key features (as described in the README)
| Feature | What it does | AI‑relevant benefit |
|---|---|---|
| Bundled bash 5.3.15 | Runs as the primary shell for DSH commands; falls back to PowerShell 7 only when needed. | Consistent, fast command execution; avoids PowerShell‑related token waste. |
| Bundled PowerShell 7.6.6 | Provides native Windows operations when bash cannot handle them. | Gives the model access to the full Windows API without extra installation steps. |
Rust file tools (ops_inspect_local_file, ops_grep, ops_glob, ops_replace) |
High‑performance text search, regex grep, globbing, and bulk replace. | Generates concise output (few tokens) and speeds up large‑file operations that an LLM might request. |
Background task manager (ops_run_background, ops_job_*) |
Starts, lists, and kills long‑running jobs (e.g., model training, simulation). | Allows the AI to fire‑and‑forget heavy workloads while keeping the chat responsive. |
| Fine‑grained component toggles | Each of the three components (shell, file tools, background) can be enabled/disabled from the DSH UI or config file. | Lets developers tailor the plugin to the exact capabilities the LLM needs, reducing attack surface and token chatter. |
| Strict JSON schema & token‑saving guidelines | ops_bash rejects unknown keys, separates short command from long script_path. |
Prevents malformed tool calls that would waste a whole model turn. |
Installation & lifecycle
- Distributed as an npm package named
dsh-ops. Install via the DSH plugin market or withnpx dsh-ops@latest install --profile <desktop|web|tui>. - Supports three DSH profiles: desktop, web, and the TUI product (
dsh‑tui). - Updates are performed by re‑running the same install command; uninstall with
npx dsh-ops@latest uninstall --profile …. - All binaries are bundled; the installer does not modify the system
PATHor install anything globally.
Configuration (YAML snippet)
config:
enableShellTools: true # turn on background component (needs full‑access session)
publishBashTool: true # expose ops_bash to the model
promptPolicy: true # inject runtime guidance into the model prompt
toolCallTimeoutMs: 300000 # RPC timeout for FastCtx calls
shellPolicy: advise # can be set to deny‑host‑shell to block host shells
allowSystemShellFallback: false # forces use of bundled bash, no silent PATH fallback
These flags let you control whether the model can call the bundled shells, whether background jobs are allowed, and how strict the plugin is about falling back to the host system.
Limitations
- Windows‑only for now (x64). Linux/macOS support is planned but will lack the bundled bash component.
- Requires the DSH 0.2.0‑rc.2 runtime; it does not work with older DSH versions.
- The Rust file tools operate outside DSH’s sandboxed file system, so they are not a security‑sandbox solution.
License – The core plugin code is dual‑licensed MIT + Apache‑2.0 (MIT for the plugin itself, Apache‑2.0 for the vendored FastCtx library). External binaries (Git for Windows, PowerShell) retain their original licenses.
Bottom line – dsh‑ops is a genuine, narrowly‑focused utility that helps AI‑driven agents run shell commands on Windows more efficiently, cutting token usage and execution time. It is a real software project in the AI‑ops space rather than a generic tutorial or list.
Related
- Project
- Project
- Project
- Project