DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
O

dsh-opencode-local

Opencode Local

Connect models from the local OpenCode client (opencode serve) to DeepSeek Harness: reuse the official client’s local loopback service to access free models, while tools are still declared and executed by DSH itself.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:yuchaos0927/dsh-opencode-local#bd7027c5d1dd5e59c2186e45761cda6e23198d3e
READMECompatibilityVersions

Compatibility and provenance

Opencode Local is published as dsh-opencode-local and currently resolves to version 0.4.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
11/3/2026

Versions

0.4.0stable
11/3/2026
0.3.0stable
11/2/2026

Related plugins

Loading related plugins…

Latest
0.4.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 1
Weekly downloads
0
Last push
11/3/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Experimental Cot Translation Bundle@deepseek-ai/dsh-experimental-cot-translation-bundleExperimental machine translation of expanded reasoningWhale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinOur Free Model@ebony-vinyl/dsh-our-free-modelOur Free Model — Install this plugin in dsh to use cutting-edge models including DeepSeek V4.1 Flash and Kimi K3, with no login, registration, or API Key required. The desktop version also offers an EAC co-payment channel; starting with 2.0, it supports ten account channels: LobsterAI, Qoder, TRAE, Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a compact price glance card above the sidebar's Settings row

README

dsh-opencode-local

Use the models of the OpenCode client installed on your own machine — including free-tier models — inside DeepSeek Harness (DSH), while DSH keeps its own tool system.

Why this plugin exists

OpenCode's free models only answer requests made by the OpenCode client itself:

Free-tier chat models are only available from within OpenCode. Other harnesses receive HTTP 403 for those models, even with a Console API key. — opencode.ai/v2/docs/console/harnesses

Calling opencode.ai directly from DSH therefore cannot work, and forged request headers only yield FreeUsageLimitError.

What this plugin does instead

Nothing is spoofed. It reuses the OpenCode client already installed on the machine.

DSH  →  this plugin  →  127.0.0.1:<random port>  →  opencode serve (official client)
                                                             ↓
                                                        free models ✅

The plugin:

  1. locates the local opencode-cli (following the version directory the desktop app rotates, and falling back to PATH),
  2. starts opencode serve on loopback the first time a model is actually used — never during Harness boot (see below),
  3. reads the random password it prints on startup and authenticates with Basic Auth,
  4. maps DSH turns onto its session/prompt + session/* event stream,
  5. stops the child process when the plugin unloads, leaving no port behind.

The request is issued by the official client, so the upstream policy is met. No public proxy is involved; traffic never leaves 127.0.0.1.

Why the service does not start at boot

Earlier versions spawned opencode serve from the plugin's apply(). That put an external program this plugin does not control onto the Harness's startup critical path: if it was slow, failing, or wedged, it dragged on startup.

The service is now lazy. During Harness boot the plugin only registers its adapter, provider directory and model discovery — it runs no child process. The child starts when you actually pick one of these models, or when the model picker asks for the catalog.

apply() also normalizes its config and runs inside a guard, so the plugin cannot abort a Harness boot or a settings projection that merely enumerates installed plugins.

How tool calling works

OpenCode is a complete agent: it declares and runs its own tools, and exposes no interface for injecting an external tool list. DSH's stream protocol also has no "provider already executed this" block, so tools cannot be forwarded as a channel.

This plugin uses prompt-level function calling:

1. DSH tool schemas are rendered into the prompt.
2. When a tool is needed the model answers with a ```dsh-tool fence holding a JSON array.
3. The plugin detects that fence in the stream and turns it into native DSH tool-call blocks.
4. DSH executes the tool (permissions, approvals, skills all stay in DSH's hands).
5. The result returns to the model as a Tool result on the next turn.

Upside: DSH's tool system, permissions and multi-step orchestration are untouched; OpenCode is purely a model backend.

Cost: this relies on instruction-following rather than a protocol-level channel. Strong models comply reliably; weak ones may need the adapter's retry.

OpenCode's own tools are gated off

OpenCode would otherwise run its own shell/file tools inside its process, where the Harness cannot approve or undo them. The service therefore starts with a private config (OPENCODE_CONFIG, a temp file this plugin owns) that defines an agent whose every tool sits behind a permission gate, and the adapter refuses each request with a hint to use the dsh-tool fence instead.

Tools cannot simply be turned off: a request that declares no tools is answered with FreeUsageLimitError (HTTP 429) by the free tier. ask keeps the declaration and still blocks execution. Set toolGate: false to opt out.

Bridged calls (v0.4)

Refusing a call is safe but wasteful: measured on a live turn, the model reaches for a native tool three times before it believes the instruction to use the envelope, and each attempt costs a model step.

So when a native call names a tool DSH also has, the adapter forwards it instead of refusing it:

session.tool.called  {name:"shell", input:{command:"ls -la"}}
   -> bridgeNativeCall() maps shell -> bash and renames arguments against
      the target tool's own JSON schema (filePath -> file_path)
   -> POST /api/session/{id}/interrupt   (OpenCode's run stops here)
   -> DSH runs bash, exactly as if the model had used the envelope

The model's intent is preserved and executed where approval lives, and the turn drops from four model steps to two. Set nativeToolBridge: false to fall back to plain refusal.

The mapping is schema-driven, not a field-name table: native argument keys are matched against the target tool's declared properties, and a required property that cannot be filled makes the bridge decline. A declined bridge is always safe — it falls back to the permission gate, which is the 0.3 behaviour.

Requirements

  • The OpenCode desktop app installed (it ships opencode-cli), or opencode on PATH
  • macOS (binary discovery currently follows the macOS desktop layout)
  • DSH runtime 0.2.1-rc.2 or newer

Not required: the OpenCode desktop app running, an OpenCode Go subscription, or a Console API key.

Install

dsh plugin --profile desktop add /path/to/dsh-opencode-local

Or edit the profile's package.json:

"dependencies": { "dsh-opencode-local": "link:/path/to/dsh-opencode-local" },
"dsh": { "profile": { "bundles": [ ..., "dsh-opencode-local" ] } }

Restart DSH, then pick a model under OpenCode in the model picker.

Restart after installing

Install the plugin, then fully quit and relaunch DSH before expecting it to work. Installing into a running Host is not reliable: the install may report application: failed with failed to import / ERR_MODULE_NOT_FOUND for a package that is plainly installed.

One case observed: during installation the runtime points some @deepseek-ai/* packages (dsh-llm, cordis) at a temporary directory via symlink, and that directory may already be gone by the time the import runs. The plugin itself unpacks correctly; only that one import attempt fails. Fully quitting and relaunching loads it normally.

Judge success by the plugin entry's real state (fiberPhase: "active"), not by the install message alone. In our run the install reported failure, and after a restart the entry was active with no crash report produced.

Separately: dangling symlinks under ~/.dsh/profiles/<name>/node_modules/@deepseek-ai/ are a normal artifact of this install model — some packages are supplied by the packaged runtime at run time and never resolved through the profile. Do not try to "repair" them. Repointing the profile's @deepseek-ai/* at self-made copies was tested and broke llm, session, and settings from loading at all. They do not affect this plugin.

Configuration

KeyDefaultMeaning
providers["opencode-local"]Provider ids this plugin answers for. Changing it invalidates saved model choices
cliPathauto-discoveredExplicit opencode-cli path
port0 (automatic)Loopback port
directoryprocess cwdWorking directory reported to the local service
modelRefreshIntervalMs600000How long the model list is cached
logLevelwarndebug/info/warn/error/off
toolGatetrueRefuse OpenCode's own tool calls so it cannot act on your machine
nativeToolBridgetrueHand those calls to DSH instead of dropping them
logDir~/.dsh/logs/dsh-opencode-localLog directory
logMaxBytes / logMaxFiles524288 / 5Size cap and retention

Logs never contain conversation content, tool arguments or credentials.

Tests

No dependencies to install — the suites load through stubs, so this works in a fresh clone:

npm test

The --import ./test/loader.mjs flag is required for two of the suites: without it the runtime cannot resolve the @deepseek-ai/* peer dependencies that only exist inside a DSH installation. npm test carries the flag; run the suites individually only if you reproduce it:

node --import ./test/loader.mjs --test test/startup.test.mjs
node --test test/local-service.test.mjs
node --import ./test/loader.mjs --test test/adapter.test.mjs

20 tests across three areas:

  • Startup contract (test/startup.test.mjs): missing or malformed config never throws; nothing is spawned during boot; a duplicate adapter registration stays inert; disposal releases every registration.
  • Child-process lifecycle (test/local-service.test.mjs): concurrent start() calls share one launch; stop() really reaps the process; a child dying during startup rejects instead of reporting ready.
  • Lazy start and adapter (test/adapter.test.mjs): the first catalog read starts the service, and the catalog is normalized correctly.

These drive a fake CLI, so no OpenCode installation is required.

Known limitations

  • Requires the local OpenCode CLI. Without it the plugin reports OpenCode CLI not found (on first use, not at startup).
  • Free quota is a limited upstream policy. Once exhausted, free models return empty responses; switch to a paid model to continue.
  • No settings UI. Adjust the profile configuration instead.
  • No GUI tool cards. DSH really runs the tools, but the protocol produces no native tool events, so visibility in the transcript is limited.
  • A bridged call's token usage is not counted. The run is interrupted the moment the call is forwarded, so the step's session.step.ended never arrives. That follows from the control flow; the size of the under-report is unmeasured.
  • A gated tool call costs a step. The private agent allows 6 steps per turn; a model that keeps reaching for native tools may spend them and then answer "I could not access it".
  • Image input is untested in a live session. The layer below works (the local service accepts data URLs).

License

MIT. Parts of lib/logger.js and lib/logger.d.ts derive from the MIT-licensed dsh-opencode-bridge; its copyright notice is kept in LICENSE. The rest — local service lifecycle, the prompt-level tool protocol and the LLM adapter — is this project's own implementation.