dsh-remote-tools
No description
- Stars
- 0
- Language
- TypeScript
- Created
- Sep 2, 2026
- Updated
- Sep 2, 2026
Introduction
@cryptocurpays/dsh-remote-tools
Out-of-tree dsh bundle: remote-host tools — discovery, an SSH terminal backend, and model-facing tools — mounted beside the shipped dsh profiles instead of inside the upstream tree. This keeps upstream upgrades cheap: the bundle only tracks the public seams it uses, never the upstream codebase's internal structure.
What it contains
| Package | Role |
|---|---|
packages/remote-hosts | Service Definition: ctx.remoteHosts discovery directory (provider registry, resolution, known-host dictionary, live-session map) |
packages/remote-hosts-jumpserver | Provider: parses pasted JumpServer SSH connect commands |
packages/remote-hosts-file | Provider: static test servers from a YAML document |
packages/terminal-ssh | Transport: SSH PTY backend registered on ctx.terminals |
packages/tool-remote | Consumer: remote_search / remote_open / remote_exec / remote_close / remote_close_all tools |
cordis.patch.yml is the bundle overlay that mounts all five.
Prerequisite: the terminal params extension
The SSH backend receives the target host through TerminalSpawnRequest.params, which upstream's dsh-terminal does not ship. Upstream's CONTRIBUTING states it cannot accept external pull requests while the project is pre-release, so this 6-line extension stays as a local patch (see patches/terminal-params.patch and docs/terminal-params-patch.md). Apply it to the installed dsh-terminal package after every dsh upgrade:
cd <your-dsh-installation>
git apply /path/to/dsh-remote-tools/patches/terminal-params.patch # paths are relative to the dsh repo root
typings/dsh-terminal-params.d.ts mirrors the same change so this bundle typechecks against unpatched types; keep both until upstream opens external contributions (watch CONTRIBUTING.md).
Install
Publish or link the five packages so the names resolve in your dsh environment, then mount the overlay:
dsh web --patch /path/to/dsh-remote-tools/cordis.patch.yml
or install the packages into a custom profile (dsh --profile <name> --plugin add <pkg>).
Upgrade workflow (when a new dsh releases)
- Pull the new dsh into your environment.
- Re-apply
patches/terminal-params.patch(required until upstream accepts external contributions). - Run this bundle's checks (below).
- Fix only if a seam API you use changed (
ctx.tools,ctx.terminals,ctx.credentials,ctx.systemPrompt) — rare and usually one call site.
Development
The bundle typechecks and tests against a local dsh checkout read-only; it never modifies it. tsconfig.base.json maps every @deepseek-ai/* name to /Users/Jeremy/deepseek-harness source paths — machine-local by design. A published build instead installs the real dsh packages and uses plain node resolution.
Run from the dsh workspace (which provides tsc and vitest):
# typecheck the whole bundle
pnpm exec tsc --noEmit -p /Users/Jeremy/dsh-remote-tools/tsconfig.base.json
# run all package tests
pnpm exec vitest run --config /Users/Jeremy/dsh-remote-tools/vitest.config.ts /Users/Jeremy/dsh-remote-tools/packages
Before publishing to npm, convert the workspace:^ peer/dev dependency ranges in each packages/*/package.json to real versions (@deepseek-ai/cordis@^4.0.2, @deepseek-ai/dsh-*@^0.1.2-alpha.4, ...). Note that upstream has only published 0.0.1-rc.3 of the @deepseek-ai/dsh-* packages so far, so real-version installs must wait for an upstream release.
Mounting into a source-mode dsh checkout (this machine)
To use the remote tools inside a local dsh that runs from a source checkout (pnpm dsh web), see the step-by-step local-mount memo: docs/local-mount.md — terminal patch, workspace-member copies, apps/cli dependencies, restart with --patch, and the per-upstream-upgrade maintenance routine.