DSH Plugins Marketplace

DSH Plugins

Plugins

/

Cargo-by-Harness

L

Cargo-by-Harness

Manifest valid

Rust, Evolved. A DSH session mode that grounds the Agent in your local Cargo cache instead of hallucinating APIs. Features pure-JS macro_rules! expansion, a strict cargo check feedback loop, and begin

hasBundlePatch

CbH Logo Cargo by Harness (CbH)

A DeepSeek Harness session mode, That gives everyone the ability to build reliable, efficient Rust software

Select Cargo by Harness when starting a new session in DSH. The Agent prioritizes retrieving crate sources and API signatures from the local Cargo cache rather than relying on memory. Core features:

  • Local-cache-first retrieval
  • Pure JS macro_rules! expansion (zero external binaries)
  • Compile-feedback loop (check → fix → verify)
  • Beginner-first guided workflow
  • Physical isolation of publish/install commands

Screenshots

DSH is developing a Tetris console game

Building a full terminal Tetris game from a single prompt.


Axum JSON Hello World Developing

Use axum to build a “Hello world” example program that returns JSON.


Tracklogs

Tracklogs During DSH Operation.

How It Works

CbH reuses DSH capability seams instead of reinventing them:

DSH CapabilityPlugin Usage
@deepseek-ai/dsh-agent-presetDeclares preset-cbh, exposing "Cargo by Harness" in the new-session mode selector
ctx.tools.registerRegisters 4 model tools: cargo_search, cargo_read, cargo, cargo_expand
ctx.commands.registerRegisters 6 deterministic slash commands; handlers answer directly without creating model messages
ctx.skills.registerRegisters 4 bundled skills: rust-beginner-workflow, rust-compile-fix, rust-crate-choice, rust-daily-loop
File SystemReads local sources and rustdoc JSON under $CARGO_HOME/registry/

Data flow in one sentence: The model uses cargo_search / cargo_read to fetch real APIs from the local cache, cargo to execute toolchain commands with structured diagnostics, and cargo_expand to see through generated code from macro_rules!.

Tools

ToolDescription
cargo_searchSearches local crate caches for crates, symbols, trait impls, or code patterns. Returns up to 20 item summaries without full doc bodies.
cargo_readReads exact signatures, docs, sources, implementations, or cache status by precise ID or full Rust path.
cargoExecutes daily toolchain commands (build/check/test/run/fmt/clippy/add/tree, etc.) with exit status and structured diagnostics. Does NOT expose publish, install, or yank.
cargo_expandPure JavaScript macro_rules! expander. Parses top-level use aliases and resolves definitions from locally cached crates. No external binaries or Rust builds required.

Installation

If you haven't installed Rust yet, click here and follow the instructions to download and install it.

dsh plugin --profile <profile> add https://github.com/Lavaver/Cargo-by-Harness

After installation, select "Cargo by Harness" in the mode selector of a new DSH session. If you modify the bundle's sub-rows (e.g., adding skills), restart the DSH process to remount the preset composition.

Usage

Once in CbH mode, describe your Rust needs in natural language. The Agent follows a "local cache → minimal implementation → compile verify → fix" rhythm.

Example prompt:

I'm a Rust beginner. Help me write a hello world using axum that returns JSON, and make sure it runs.

The Agent will first use cargo_search to check the local axum version and API, write the code, run cargo check to verify, and automatically apply the rust-compile-fix skill when errors occur.

Retrieval Order

Both tools and commands follow the same non-skippable order:

  1. $CARGO_HOME/registry/src/<index>/<crate>-<version>/ — Cargo unpacked source.
  2. Workspace's exact version: Cargo.lock first, then manifest version requirements.
  3. Cached rustdoc JSON as the structured layer; registry source remains authoritative for declarations, where clauses, and feature-gated code.
  4. Only if steps 1–3 miss, perform a single minimal remote completion (crates.io .crate or docs.rs rustdoc JSON), written under $CARGO_HOME/cbh-cache/ before returning.

Commands

CommandPurpose
/cargo-doctorDiagnose Rust toolchain, workspace, lockfile, and target directory.
/cargo-check [--all-targets] [--clippy] [--offline] [--timeout <s>]Compile-verify and deterministically summarize diagnostics (error/warning counts, error codes, file:line:col).
/cargo-cache [status|list|prune|verify]Inspect, list, prune unreferenced cache entries, or verify cached crates.
/cargo-fetch <crate>[@version] [--from crates.io|docs.rs|local]Perform one minimal remote completion.
/cargo-workspace [deps|features|target]View current workspace dependency resolution.
/cargo-item <crate::path> [--source]Read an exact single item, optionally including the source snippet.

Commands perform deterministic, cacheable work only. Anything requiring natural-language judgment of "what to look up" is delegated to cargo_search / cargo_read tools.

Verification

Local check scripts are provided under the ../tools/ directory:

node tools/cbh-smoke.mjs                    # registry, version precedence, all commands
node tools/cbh-command-test.mjs             # command registration and handlers
node tools/cbh-tool-test.mjs                # fallback compiler path
node --import ./tools/register-cbh-stubs.mjs tools/cbh-tool-test.mjs   # host compiler path + schema parity + cargo_expand
node tools/cbh-macro-expander-test.mjs      # pure-JS macro expansion and graceful degradation
node tools/cbh-skills-test.mjs              # bundled skill discovery and registration
node tools/cbh-cargo-run-test.mjs           # cargo runner: whitelist, diagnostics, metadata
node tools/cbh-toolchain-test.mjs           # real cargo doctor / check (fixtures)
node tools/cbh-remote-smoke.mjs             # crates.io completion (throwaway CARGO_HOME)

tools/vendor/dsh-tools is a test-only extraction of @deepseek-ai/dsh-tools from the installed app, used to run the schema compiler outside the Host.

Verified Records: Real run of cargo check --offline on a failure correctly reported error [E0308] src/main.rs:2:22 mismatched types. /cargo-doctor correctly identified cargo 1.99.1 / rustc 1.99.1 / edition 2021.

Known Limitations

  • No Procedural Macro Expansion: #[derive], attribute macros, and functional proc-macros are left untouched; cargo_expand returns the original code. Reason: Proc-macros require compilation execution, which pure static analysis cannot cover. Mitigation: The Agent can fall back to cargo_read to inspect the macro crate's source for alternative context.
  • No Glob Import Resolution: Imports like use tokio::*; do not establish macro alias mappings. Reason: Static text cannot determine which macros a glob actually imports. Mitigation: When a bare call cannot be resolved, cargo_expand reports it as unresolved, and the Agent can switch to a fully qualified path.
  • No Macro Hygiene: Identifier capture checks are skipped during expansion. Reason: Pursuing compiler-level hygiene significantly increases the complexity of a pure JS implementation. Mitigation: Expanded calls are appended with /* <- [original call] */ comments to preserve a trace back to the original invocation.
  • Restart Required for Preset Reinstall: Modifying preset sub-rows (skills, tool rows) mounts new compositions at startup; a DSH restart is required to load them. Mitigation: This is inherent to the DSH preset mechanism and is documented.

License

MIT

Comments

Loading…

Similar plugins

dsh-bot

by wqty123

Resident agent entity for DeepSeek Harness: bots that live outside any session, with file-based memory you can open and edit, a task queue, an approval gate, and an optional background executor. Ships

Manifest valid

★ 1

NOASSERTION

JavaScript

Oct 1, 2026

dsh plugin --profile web add dsh-bot

by lispking

A self-evolving plugin for DeepSeek Harness (dsh). It observes how the agent runs, proposes improvements to its own assets via the LLM, validates each proposal inside a sandboxed trial agent, and appl

Workflow & AutomationManifest valid

★ 4

↓ 684/wk

MIT

TypeScript

Oct 15, 2026

dsh plugin --profile web add dsh-auto-evolve

by GraySilver

让 Agent 的工作方式可组合、可审查、可持续改进,最终实现 Agent Self Evoling。 DeepSeek Harness Web plugin with composable task controls and isolated, human-reviewed self-evolution.

Workflow & AutomationManifest valid

★ 204

↓ 354/wk

MIT

TypeScript

Aug 18, 2026

dsh plugin --profile web add @graysilver/dsh-evolve-modes

by Oliver0804

Map dsh (DeepSeek Harness) workspaces onto a Discord category — query session trajectories and live subagents, and drive an agent, from anywhere with no inbound port.

Development & InfrastructureManifest valid

★ 3

↓ 46/wk

MIT

JavaScript

Oct 18, 2026

dsh plugin --profile web add dsh-discord-bot

by ZekaiShi

Unified DeepSeek Harness plugin: role-based subagent routing + per-agent evolution (prefercmd/memory as knowledge allow/deny lists), so repeated tasks start from proven commands and save tokens. Unifi

Workflow & AutomationManifest valid

★ 7

↓ 128/wk

MIT

JavaScript

Oct 24, 2026

dsh plugin --profile web add evo-subagent

by BOWLUNA

Structured git tools for DeepSeek Harness agents: status, diff, log, branch, commit and stash - pinned output, no shell involved, approval-gated writes.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add dsh-zcode-git