DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-plugin-sandbox-mode

d

dsh-plugin-sandbox-mode

Manifest valid

A separate agent mode for DeepSeek Harness: reasoning goes into a sandbox document, every action is written there first and then executed by reading it back, and the final answer is printed from that

hasBundlePatch

Sandbox Mode for DeepSeek Harness

A separate agent preset (mode) for DSH. It implements a strict two-phase sandbox:

  • The agent's reasoning is recorded in a thought log.
  • Every intended action is first written into one sandbox document.
  • Every action is executed by reading that document back, never from a one-off tool argument.
  • The final answer is the output section of that document, printed by sandbox_emit.
  • sandbox_emit also writes the exact text to OUTPUT.md and registers both the output file and the full document as deliverables, so the Web UI shows a file card with a working path and preview. Its tool result starts with the absolute OUTPUT.md path, followed by the exact text.
  • Direct calls to other tools are blocked per agent.

The mode appears in the existing mode picker beside the shipped modes. It does not add a panel, button, or option that competes with other settings.

Token warning. This mode is deliberately more expensive. Every action and the final answer goes through at least one document write, one read-back review, and a separate run/emit call. The mode picker shows this warning when you select it.

What it looks like

Agent reasoning
   │  sandbox_think
   ▼
SANDBOX.md  ──  brief / prepared output / prepared actions / notes
   │  sandbox_set_actions          │  sandbox_doc_set
   ▼                               ▼
sandbox_run                     sandbox_emit
   │                               │
   ▼                               ▼
shell actions executed         exact output printed, OUTPUT.md card

Install

From GitHub (recommended) — open Plugins → + Add plugin in DSH and enter:

github:wth373737/dsh-plugin-sandbox-mode

then restart DSH once (the preset and its guard are registered by the Host at startup).

From a local checkout (development) — install the bundle by absolute path, either through the plugin manager's install_bundle or by asking the agent to do it:

plugin_manager action=install_bundle target=<absolute path to this directory>

Either way the bundle inserts one preset row (preset-sandbox) and one child plugin row (sandbox-mode). The child plugin is this package; the preset resolves it from the profile after installation. No existing preset, menu, or setting is modified, and the new mode appears beside the shipped ones in the mode picker.

Requirements:

  • A DSH profile with the tools, systemPrompt, and shell services mounted (the standard Web profile has them).
  • Windows or POSIX. On Windows the action shell is PowerShell 7; elsewhere it is bash.

The mode protocol

The model sees exactly seven tools:

ToolPurpose
sandbox_statusShow sandbox paths, document state, shell dialect, and file policy.
sandbox_thinkAppend one reasoning record to THOUGHTS.md.
sandbox_doc_readRead the whole document or one section.
sandbox_doc_setReplace the brief, output, or notes section.
sandbox_set_actionsValidate and replace the prepared action list.
sandbox_runExecute the prepared actions from the document.
sandbox_emitPrint the output section, return its OUTPUT.md path, write OUTPUT.md, present the output file, and end the turn.

All other tools are blocked by a preset-scoped guard. Global tools are also hidden from the agent with the same preset-scoped restriction, so they do not consume schema tokens or tempt the model.

The guard and the global-tool restriction are registered once in the preset scope, not only when a session is created with this mode. That matters because the Web mode picker creates a session under the previous mode and switches the preset immediately afterwards: a creation-time-only guard would miss that session entirely. In a verified test session the model's request header contained exactly the seven sandbox_* tools, with none of the profile's other tools.

The system prompt makes the rule explicit: do not write user-facing prose in assistant messages; every assistant message should contain only sandbox tool calls. The final answer is the sandbox_emit tool result.

Actions

Only shell actions are supported:

[
  {
    "type": "shell",
    "command": "Get-ChildItem",
    "description": "List workspace files",
    "timeoutMs": 120000,
    "continueOnError": false
  }
]

Each action runs in a fresh shell with the session workspace as its working directory. The session's existing file policy (read-only / workspace-write / danger-full-access) still applies. By default sandbox_run stops after the first failed action; set continueOnError: true to continue.

Sandbox files

Each session gets its own directory inside the workspace:

.sandbox/<session-id>/
  SANDBOX.md     # the single source of truth for actions and output
  OUTPUT.md      # exact copy of the output section, written by sandbox_emit
  THOUGHTS.md    # append-only reasoning log
  .gitignore     # keeps the sandbox out of git

The plugin writes these files directly. They are plugin-owned metadata, so they remain writable even in a read-only session; the sandbox does not use the model's file tools.

Where is the output?

sandbox_emit does three things:

  1. returns the absolute path of OUTPUT.md and the exact output text as the tool result;
  2. writes the same text to OUTPUT.md;
  3. appends a deliverables/presented record for OUTPUT.md and SANDBOX.md.

The first line of the tool result is the path, so the file is visible in the chat even if the delivery card is collapsed. The last step uses the same delivery surface as the built-in present tool, so the turn ends with two clickable cards: OUTPUT.md (the exact answer) and SANDBOX.md (the full document, including the action list and notes). Clicking a card previews it in the right Sidebar; the open control opens the file in the system's default application. The absolute paths are also shown by sandbox_status.

Example

  1. The user asks: "What is in the workspace?"
  2. The agent calls sandbox_status.
  3. The agent calls sandbox_think with its analysis.
  4. The agent calls sandbox_set_actions with [{ "type": "shell", "command": "Get-ChildItem" }].
  5. The agent calls sandbox_doc_read to review the exact command.
  6. The agent calls sandbox_run; the transcript comes back.
  7. The agent calls sandbox_doc_set with the final answer in output.
  8. The agent calls sandbox_emit; that output is the turn's final visible result.

Design notes and limits

  • A mode plus a delivery card. The mode picker gets one extra row; the only other UI is the standard deliverables card at the end of the turn, which points at OUTPUT.md and SANDBOX.md. No new panel or competing control is added.
  • Tool calls are blocked, assistant prose is not. DSH has no plugin hook that erases text the model already streamed. The system prompt forbids prose, but a determined model can still emit it. The sandbox controls actions and the final output; it is not a security boundary against the model itself.
  • Shell actions can edit the document. The document is a normal file. A shell action could rewrite SANDBOX.md, so the guarantee is "the document is the only action/output source", not "the document cannot be tampered with by an action".
  • One session, one sandbox. The directory is keyed by session id, so parallel sessions do not share a document.
  • Compaction is included. Long sandbox runs can compact normally.

Development

node --check index.js
node test-internals.mjs

The module only imports Node built-ins. It registers its tools, prompt section, guard, and global-tool restriction as Cordis effects in the preset scope. The restriction is refreshed when an Agent joins the preset and when a session selects the preset, so the visible tool set stays limited to the sandbox tools.

Because this is a Host plugin, DSH must be restarted once after installing a changed build; the running Host keeps the previous JavaScript generation until then. The mode itself needs no separate UI build.

License

MIT

Comments

Loading…

Similar plugins

dsh-auto-evolve

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

↓ 497/wk

MIT

TypeScript

Oct 15, 2026

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

by xueccci

Agent-structured prompt optimizer for DeepSeek Harness (dsh). Modes: normal/slim/expand. Engines: local, hybrid, DSH, cloud API. Modal confirm with score and continue-optimize.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 3

↓ 208/wk

MIT

JavaScript

Oct 16, 2026

dsh plugin --profile web add dsh-prompt-lab

by Neo65536-engineer

Read-only work reports for DeepSeek Harness: reconstruct what an agent task actually did from session logs — tools used, files read/written, commands run, test results, failures, token usage, and whether it finished. Fully offline, no API key, no data leaves your machine.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 2

MIT

JavaScript

Sep 26, 2026

dsh plugin --profile web add dsh-agent-log

by bainianlaoyao

Codex-shaped coding tools and agent presets for GPT models on DeepSeek Harness: exec_command, write_stdin, apply_patch and view_image, plus OpenAI Chat Completions and Responses API routes, bridged to

Workflow & AutomationModels & ProvidersManifest valid

★ 0

JavaScript

Sep 13, 2026

dsh plugin --profile web add dsh-codex-mode

by lidaqi001

Adds a DeepSeek Harness agent preset that hands implementation work to Codex subagents (auto-approved, workspace-write sandbox); the session agent only splits tasks, dispatches them and reports result

Workflow & AutomationManifest valid

★ 0

MIT

JavaScript

Nov 6, 2026

dsh plugin --profile web add dsh-codex-delegate

by mario841859784

Agent preset plugin for DeepSeek Harness that triages every request, delegates implementation to an expert, and schedules parallel work through a dependency-DAG taskboard and a file-based message bus

Workflow & AutomationDevelopment & InfrastructureSessions & MessagesManifest valid

★ 16

↓ 1.1k/wk

MIT

JavaScript

Nov 13, 2026

dsh plugin --profile web add dsh-expert-orchestrator