dsh plugin

Trigger and take over Grape pipelines directly in DeepSeek Harness: a tool set and a sidebar panel.

@grape-dev/grape-dsh is a plugin for DeepSeek Harness (dsh): it triggers, monitors, and takes over Grape Pipelines (Scenes) directly inside dsh. It does not deploy any service; it is installed on your coding agent side, and the work itself still runs on Grape's Engines (deployed on Workers).

What it gives you

Surface Content
Model-facing grape_* tools Pipeline trigger/status, Issue lifecycle, events, Scenes, repositories, Skills, Knowledge Base, board, project templates
Sidebar panel + focus pin One Pipeline card per Issue, node chain, takeover operations, Worker onboarding

Both surfaces communicate with Grape through the grape CLI subprocess (the panel and takeover use the HTTP API), and the plugin stores no keys itself.

Installation steps

Step What to do Completion criteria
Step 1 Prepare dsh, Node, the grape CLI, the Grape address, and a user-level API Key Versions meet the requirements and the Key works
Step 2 Install @grape-dev/grape-dsh The plugin appears in dsh plugin list
Step 3 Configure baseUrl / token in cordis.patch.yml The configuration contains id: grape-tools
Step 4 Restart dsh and verify the plugin --dump-config shows the plugin configuration
Step 5 Onboard the local Worker and confirm the environment matches The panel can start and stop Pipelines, and the status is not "environment mismatch"

Step 1: Prepare prerequisites and credentials

Dependency Version Purpose
dsh Per the version requirements in the plugin README Host environment
Node.js >= 18 Runtime for dsh and the plugin
Python >= 3.10 grape CLI
grape CLI >= 0.3.3 Tool transport (grape … --json-out)
Grape server Includes the takeover API Takeover, Worker onboarding, and panel routing

You also need a Grape user-level API Key (grape_…, generated under User settings → API Keys) and the Grape base URL.

Step 2: Install the plugin

The repository ships an installation Skill at skills/grape-dsh-install/SKILL.md. Point your agent (dsh / Claude Code / Codex / opencode) at it and let it run preflight → install → verify, stopping at the first failed gate.

bash · deterministic script (the agent uses it too)

git clone --depth 1 https://gitcode.com/grape-dev/grape-dsh.git
bash grape-dsh/skills/grape-dsh-install/scripts/install.sh <profile>
# Windows: pwsh -File grape-dsh\skills\grape-dsh-install\scripts\install.ps1 -Profile <profile>

It builds lib/ from source, packs a tgz, installs it, and prints the stable tgz path. skipped: already-present means that version is already installed.

Manual installation (alternative)

bash · five paths, pick one as needed

# 1) Published version (0.5.0+ includes lib/): the shortest path; pin the version
dsh plugin --profile <profile> add @grape-dev/grape-dsh@<version>

# 2) Unpublished ref or local changes: build a tarball from source, then install
cd grape-dsh && bash skills/grape-dsh-install/scripts/install.sh <profile>

# 3) Install a prebuilt tarball (offline/internal network)
npm pack
dsh plugin --profile <profile> add file:/abs/path/grape-dev-grape-dsh-<version>.tgz
#   Equivalent inside a dsh session: plugin_manager install_bundle "<abs tgz>"

# 4) Install from git (works, but the pnpm prepare-script gate may block it; prefer the tarball)
dsh plugin --profile <profile> add git+https://gitcode.com/grape-dev/grape-dsh.git

# 5) Local development (link)
cd /path/to/grape-dsh && pnpm link --global
cd ~/.dsh/profiles/<profile> && pnpm link @grape-dev/grape-dsh

💡 Pin the version for reproducibility

When a profile must be reproducible, write an exact version; use npm view @grape-dev/grape-dsh version to check the current published version.

Step 3: Configure the plugin

yaml · ~/.dsh/profiles//cordis.patch.yml

- id: grape-tools
  name: '@grape-dev/grape-dsh'
  config:
    baseUrl: 'https://<your-grape-domain>'   # Required; the only source of the environment address
    token: 'grape_xxx'                          # Required; read from config only
    deviceName: 'dsh-worker-001'                # Optional; must start with dsh
    bin: ''                                     # Optional → GRAPE_CLI_BIN or grape on PATH
    timeout: 30

🚨 Environment variables do not count here

The plugin reads baseUrl and token from config only. It no longer reads GRAPE_BASE_URL / GRAPE_SERVER_URL / GRAPE_API_TOKEN and has no built-in defaults: a wrong configuration fails immediately instead of silently connecting to another server.

Step 4: Restart and verify the plugin

After installing the plugin or modifying cordis.patch.yml, restart the dsh host or the current session to reload the configuration, then verify:

dsh plugin --profile <profile> list        # Should include @grape-dev/grape-dsh
dsh --profile <profile> --dump-config      # Should include id: grape-tools

✓ Expected result: both commands match; the panel shows Pipeline cards and the Connect local machine status, and no longer reports an environment mismatch.

Step 5: Onboard the local Worker and confirm the environment matches

The local Worker's RUNTIME_SERVER_URL (in ~/.grape/runtime.env) must match config.baseUrl. If they differ, the panel decides that the environment has no Worker, shows Environment mismatch, and refuses to start or stop Pipelines.

Procedure

  1. Open the Grape plugin panel in dsh
  2. If Environment mismatch appears, select Connect local machine
  3. Wait for the plugin to rewrite runtime.env and reissue credentials for the configured deviceName
  4. Confirm that the panel no longer reports an environment mismatch and that Pipeline cards start and stop normally

Connect local machine overwrites the local Worker address and credentials. To switch a machine to another Grape environment, you must reconnect; changing config.baseUrl alone is not enough.

Failure states

Symptom Cause Action
The panel shows Environment mismatch The URL in runtime.env ≠ config.baseUrl Select Connect local machine to reinstall and rewrite runtime.env
All tools error but dsh works The grape CLI is not on PATH, or the version is below 0.3.3 Set bin or GRAPE_CLI_BIN, and upgrade the CLI
401 / 403 The token is not a grape_ user-level Key Regenerate it under User settings → API Keys
Installing from git fails The pnpm prepare-script gate Install from a tarball instead

Where the full documentation is

File Content
grape-dsh/README.md Tool list, Pipeline status semantics, takeover flow, local Worker status
AGENT-DEPLOYMENT-GUIDE.md The five installation gates, measured failures, and fixes
skills/grape-dsh-install/SKILL.md The installation Skill for agents to execute

Installation and startup | CLI | Runtime and Worker | A2A collaboration API