OpenCode 2 client for dsh: one board across every server (7/30-day insight window), remote session reading and continuing, task delegation, and each server registered as a native dsh subagent backend.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:yhuan416/dsh-opencode-client
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
An observation console for a fleet of OpenCode servers, plus a native dsh subagent backend.
The plugin connects to one or more remote opencode serve instances and answers three questions
OpenCode's own clients cannot: which sessions are running across all servers, which are waiting
for you, and what failed — then delegates work into them and registers each server as a native
dsh subagent provider (opencode-<serverId>).
Positioning (0.6.0): session access is a means, not the goal. Chatting inside a session belongs to OpenCode's TUI/Web (we deep-link into it); this plugin owns the cross-server board, the attention feed, and the agent-facing backend.
Two tracks, one core (2026-11-27):
[observe]— the human-facing console (board, attention, cost governance) — is the current priority and is being finished first;[delegate]— the agent-facing tools and native subagent provider — follows in later releases. Both share one transport and version-probing core. SeeTODO.md§10 for the per-track roadmap.
Compatibility: OpenCode 2.x only (/api/* + HTTP Basic auth). The v1 API (OpenCode
1.18.x) was frozen in 0.7.2 and removed in 1.0.0 — a v1 server now fails with a clear
"requires OpenCode 2.x" error. apiVersion: auto|2 is accepted;
auto probes GET /api/info and records why a probe failed.
See Compatibility & versioning.
Primary role: register OpenCode as a native dsh subagent backend (
opencode_subagent_<server>) and expose remote sessions/workspaces as tools (opencode_subagent,opencode_prompt, shell/git/read/find, catalogs). The embedded OpenCode Web UI is an optional convenience for full-fidelity work, not a replacement for the OpenCode client.
Screenshots
Board — one page across every server: attention, 7/30-day insights, a 30-day activity calendar, and the idle fleet below.

Insights — cards, daily steps and the activity heatmap share one top row.

Table of contents
- Screenshots · Quick start · Architecture · Features
- Install (profile) · Configuration · Subagent seam
- Documentation · Ecosystem · Compatibility & versioning · Notes
Quick start
# 1. install the plugin into the web profile (bundle selection is composed at restart)
dsh plugin --profile web add /path/to/dsh-opencode-client
# 2. configure at least one server (full schema in Configuration)
# OpenCode 2.x also needs the server password:
# config.servers: [{ id: n100, url: "http://192.168.4.50:4096", password: "<OPENCODE_SERVER_PASSWORD>" }]
# 3. restart dsh web
dsh web
Verify:
- Settings → Plugins → OpenCode Client shows the server / workspace / session section
(
GET /api/opencode-client/listanswers with the configured servers). - Ask the agent to call
opencode_sessions— it lists remote sessions, so the HTTP path toopencode serveworks end to end. - Optional: expose the server as a native subagent (
opencode_subagent_<server>) — see Subagent seam.
Full live acceptance run (needs a real OpenCode 2 opencode serve):
OPC_LIVE_URL=http://192.168.4.50:4096 \
OPC_LIVE_PASSWORD='<OPENCODE_SERVER_PASSWORD>' \
OPC_LIVE_DIR=/home/yhuan/workspace \
node scripts/e2e-live.mjs # or: npm run e2e; OPC_LIVE_INTERACTIONS=1 also exercises approval/question bridging
OPC_LIVE_PASSWORD is required (OpenCode 2 always uses HTTP Basic auth). Offline checks:
npm test (unit + transport tests) or npm run check (smoke checks + tests).
Prerequisite: opencode serve must be reachable from the dsh host. It binds 127.0.0.1 by
default — bind 0.0.0.0 or put it behind an SSH tunnel. OpenCode 2 always requires
OPENCODE_SERVER_PASSWORD on the serve process plus the same value in the plugin's server
password.
Architecture
OpenCode's own architecture: opencode serve exposes an OpenAPI HTTP server "that an opencode
client can use"; the TUI / Web / SDK are clients of it. This plugin is another client, hosted in
dsh.
flowchart LR
BROWSER["browser<br/>dsh Web UI"] -->|"same-origin HTTP"| DSH["dsh web<br/>host process"]
subgraph PLUGIN["dsh-opencode-client plugin"]
direction TB
CLIENT["client bundle<br/>board page · settings section"]
ROUTES["routes<br/>/api/opencode-client/*"]
TOOLS["tools<br/>28 × opencode_*"]
PROVIDER["provider<br/>opencode-<serverId>"]
SSE["sse<br/>v2 /api/event"]
end
DSH --> CLIENT
DSH --> ROUTES
DSH --> TOOLS
DSH --> PROVIDER
ROUTES -->|"v2 HTTP API"| N100["opencode serve · n100"]
TOOLS -->|"v2 HTTP API"| N100
PROVIDER -->|"v2 HTTP API"| N100
ROUTES -->|"v2 HTTP API"| M65["opencode serve · m65"]
TOOLS -->|"v2 HTTP API"| M65
PROVIDER -->|"v2 HTTP API"| M65
N100 -.->|"SSE"| SSE
M65 -.->|"SSE"| SSE
CLIENT -.->|"iframe: native OpenCode UI"| N100
The browser only talks to the dsh origin — lib/client.js renders the board/plugin page and
embeds the native OpenCode UI in an iframe when a session is opened. lib/routes.js
(/api/opencode-client/*) and the model-facing opencode_* tools (lib/tools.js) make
deterministic calls through @opencode/client (pinned 2.4.2, one client per server);
lib/provider.js (opencode-<serverId>) and lib/session-run.js drive delegated runs;
lib/sse.js subscribes to each server's /api/event stream with Basic auth and reconnect for
live progress, completion and permission/question bridging. lib/http.js probes
GET /api/info once per server, adds HTTP Basic auth and rejects v1 with an actionable error;
lib/oc-client.js owns the client instance and error mapping.
More: ARCHITECTURE.md · docs/ARCHITECTURE.zh.md.
Features
28 model-facing opencode_* tools, host routes, one native subagent provider per server — the
same tool names. OpenCode 2 is the only supported generation: v1 was frozen in 0.7.2 and
removed in 1.0.0; a v1 server is rejected at the transport with an actionable error (policy).
OpenCode 2 API notes
OpenCode 2 removed a few v1 endpoints. Two capabilities now return an explicit "not available on OpenCode 2" message instead of empty data, two are restored with v2-native calls, and two are v2-only:
| Capability | OpenCode 2 behaviour |
|---|---|
opencode_share |
not available (no share endpoint) |
opencode_tools |
not available (no tool-ids endpoint) |
opencode_find with kind=text |
restored via fallback: no content-search endpoint, so the plugin runs a workspace grep through the async shell (literal substring, first 100 matches) |
todo list in opencode_session_info |
restored via fallback: /session/{id}/todo was removed, so todos are derived from the last todowrite tool call |
opencode_usage |
OpenCode 2 only: GET /experimental/session/stats aggregates sessions/steps/tokens/cost/tool success rate, plus per-model attribution and (host route ?group=directory) per-directory cost |
| background jobs (board/progress) | OpenCode 2 only, experimental: GET /experimental/job lists work that outlives the turn (e.g. a shell script still running after the session went idle); shown as the background status |
On OpenCode 2 the plugin also normalizes these API differences for you:
- Sessions carry
location.directory; session/message/diff results are normalized to one shape. - Prompts are
{text, files};agentandmodelare session state (POST /api/session/{id}/agent|model). - Completion is detected from
session.execution.succeeded|failed|interruptedevents. - Permission approvals use
once|always|reject; questions arrive as forms with typed fields (string / number / integer / boolean / multiselect). opencode_shellruns asynchronously in the session workspace (submit, poll, read output); output pages are followed via cursor (up to 1 MiB) and truncation is reported explicitly with exit/signal.opencode_summarizemaps tocompact(the session's own model is used, somodelis optional);opencode_initruns the built-ininitcommand;opencode_git_diffmapsgit→working;opencode_findretries a glob query as a plain substring (the endpoint does not understand*/?).
Subagent delegation
- Native subagent — provider
opencode-<serverId>; pair with@deepseek-ai/dsh-tool-subagentto expose one-shotopencode_subagent_<server>tools. - Delegation — tool
opencode_subagent(new session, or continue withsession=; optionalagent,modeland prompt-enforcedschema); usessession.prompt+ message polling with a blocking wait, and returns the final answer plus the session id. The prompt is{text, files}andagent/modelare applied as session state. - Turn-by-turn continuation —
opencode_promptsends one message to an existing remote session (fire-and-forget by default,wait=trueto block); read the reply withopencode_messages/opencode_progressand send the next message. This keeps a remote worker session alive across dsh turns. - Completion wait —
prompt_async+ SSE event-driven (returns immediately when the remote finishes), 5 s polling fallback, then a blocking wait. Completion is detected fromsession.execution.succeeded|failed|interrupted. - Live progress —
opencode_progress(current tool/step, elapsed, output tail) fed by SSE tool events; delegation completes on the SSE completion event. - Abort —
opencode_abortstops a running remote session (session.interrupt); a waiting delegation returns an abort error instead of hanging. Call it from another dsh session/agent: tool calls inside one turn are serialized, so it cannot preempt a blockingopencode_subagentin the same turn. - Attachments —
opencode_subagentaccepts afilesJSON array (text/base64 → data URL); attachments are sent as{uri, name}.
Sessions & messages
- Server configuration —
servers: [{ id, label?, url, password?, directory? }], with optional per-server defaultagentandmodel. - Discovery —
GET /api/opencode-client/list(server health, projects, sessions grouped by directory; the directory comes fromlocation.directory). - Session listing — tool
opencode_sessions+GET /api/opencode-client/sessions; rows include the model (with#variant), agent, outcome and cost when the server reports them.archived=truelists archived sessions, andcursor/nextCursorpage past the first 500-row snapshot. - Session messages — tool
opencode_messages+GET /api/opencode-client/messages(text, tool and file parts;content[]text/reasoning/tool parts are normalized). Tool lines include the call input summary and the first output line;type=filters one message kind (server-side). Useful to decide whether a session is the right one to continue. - Session info — tool
opencode_session_info(title/summary/todos/diff; the todo list is derived from the lasttodowritecall, and outcome/cost/tokens plus the changed-file diff are reported) andopencode_share(share/unshare link; not available on OpenCode 2 and the tool says so). - Session management —
opencode_fork,opencode_children,opencode_summarize(mutating; v2 maps it tocompact, where the session's own model is used andmodelis optional),opencode_init(writes AGENTS.md, requiresconfirm=true; runs the built-ininitcommand). - Session search & diagnostics —
opencode_search(session search through the list endpoint'ssearchfilter),opencode_mcp(MCP server status). - Multiple servers — configured as an array and aggregated by the client (opencode itself has no server-side federation).
Catalogs & tool discovery
- Agent catalog — tool
opencode_agents+GET /api/opencode-client/agents(primary/subagent, native/custom); call it beforeopencode_subagentto pick an agent name. - Catalogs —
opencode_models(providers/models, credentials stripped),opencode_commands,opencode_skills,opencode_tools(not available on OpenCode 2; no tool-ids endpoint),opencode_references. - Command execution —
opencode_commandruns a remote command (e.g.init) inside a session and returns its final text.
Workspace & git
- Workspace ops —
opencode_shell,opencode_git_status,opencode_git_diff,opencode_read_file,opencode_find(kind=filesearches paths,kind=dirdirectories;kind=textruns a workspace grep fallback). - These are deterministic direct calls (no remote model involved): verify what a remote agent changed, read a file, run a command, or search the workspace.
opencode_shellis asynchronous (submit, poll, read output) in the session workspace;opencode_git_diffacceptscommitted/branch/working(withgitmapped toworking), plusuntracked=files|foldersandbase=<ref>.
Permissions & events
- Permission approval —
permission: ask(default) turns remote permission requests into dsh approval cards (once/always/rejectare your call);allowis the explicit auto-approve bypass andrejectrefuses everything (unattended deployments). Withaskthe outcome depends on the caller: a delegated run (agent in scope) shows the host approval card; a session dsh did not start keeps the request pending in the board's "needs you" row until you answer in the session; when no approval service is available the request is auto-answeredalwayswith a warn in the plugin log. Every request is counted as a permission diagnostic — the/boardserver object carriespermissions(asked / user-approved / auto-approved / rejected / pending plus the last 20 action+resources) and the board card shows "权限 N · 自动 M" (warning tone when anything was auto-approved), so "the remote never asked" and "it asked and was answered silently" are no longer indistinguishable. - Question bridging — remote questions are forwarded to dsh's user-question UI for
tool-initiated runs (an agent is in scope). A session dsh did not start (for example one you
opened in the OpenCode TUI/Web) keeps its question pending by default: it shows up in the
board's "needs you" row, triggers the attention notification, and waits for you to answer in the
session;
question: rejectopts an unattended deployment into dismissing it. Questions are forms with typed fields (string / number / integer / boolean / multiselect). When several clients share the same OpenCode server, the first client that sees a form answers it: keepquestionidentical everywhere — a client still onquestion: reject(or an older build) dismisses the form before the "needs you" card can appear. - Live events — per-server SSE subscription (
/api/event) with reconnect; fast permission/question handling, live state,GET /api/opencode-client/eventsand/status. - Polling fallback — permission/question requests are answered while a delegated run is active: SSE events are handled immediately, with a 15 s polling fallback when the stream is unavailable.
UI
- Observation console (main panel, 0.6.0) — the left-rail
OpenCodeentry opens a card board, not an embedded page: "needs you / running / error" sit on top across every remote, idle sessions are grouped per remote and directory, a remote filter chip keeps its selection, and a card opens that session in an overlay (Esc or the top bar closes; the overlay keeps a "new tab" escape). Backed byGET /api/opencode-client/board, polled every 5 s and paused while the page is hidden. - Plugin page — "OpenCode Client" section: servers/workspaces/sessions, session ids, active tool, messages, create session.
- Embedded OpenCode UI — a server row's "打开" button opens the real OpenCode Web UI in a fullscreen overlay; a board card opens that session in an in-panel iframe, with "全屏" and "新标签" as escapes. No reimplementation — the embedded page keeps streaming, tool cards, diffs and permissions.
- Usage & attribution (0.7.1 / 0.8.0) — per-server cards show today's tokens/cost, the board has a
"finished, not looked at" zone, and the settings page shows a 7-day per-model / per-directory split
(
reconciledmarks a mismatch with the stats total). - Background work (0.8.0) — a session whose turn ended but whose shell job is still running shows
as "background" with the command and elapsed time, instead of looking idle. When the SSE stream
connects mid-run, the current tool is read once from
session/active+ the latest message so a running card is not blank until the next event. - Insights (0.9.0) — the top of the board page shows a 7/30-day window: session counts, tokens,
cost, cache hit rate, a daily steps chart, plus a separate 30-day activity heatmap
(GitHub-style week columns with month labels; switch between sessions / tokens).
It sits in the top row next to the six cards and the steps chart, like the context-insight
plugin. The heatmap uses one bounded per-day stats call per server, cached for 10 minutes. Top
models/projects, MCP/custom tool usage grouped by server (builtin shell/read/write are not
shown) and per-skill load counts stay on the 7/30-day window. The heatmap itself is fixed at
30 days; the footnote states what OpenCode cannot provide (daily cost, token composition,
duration breakdown). Skill names come from a lazy message scan (
/insights/skills); the activity heatmap is served by/insights/activity(30 days, sessions/tokens). - Upgrade hint — each server card shows
→ vX.Y.Zwhen a newer OpenCode is out (checked once at startup and then daily against the official update service; no badge when offline). - Plugin's own version / repository / update check (1.1.0) — the board header carries a
vX.Y.Zchip (opens the GitHub repository) that turns into "可更新 vY" when a newer release exists; the settings section ends with an About block: version, repository link, latest / update-available / unavailable check, last-checked time and 重新检查. Version and repository come from this package'spackage.json; the newest release comes from GitHub Releases (cached 24 h in the Host, retried after 1 h on failure; the board chip, settings block and detail badge share one load, so a cold start spends one GitHub request). Offline / rate-limited checks degrade only the check area and keep the last known version. 更新 hands registry installations to DSH's own update flow; a path-linked checkout opens the release page and shows a copyablegit -C <dir> pull --ff-only; git installs (plugin market) update through the release page / market. - Fleet health (0.8.0) — the board and settings page show API-version drift, probe failure reasons and SSE reconnect counts.
- Entry points — the left sidebar
OpenCodeentry opens the board; server rows and board cards open the embedded UI. There is no session-header button or right-sidebar tab anymore.
Install (profile)
Installing on another machine (Windows / DSH Desktop, multiple servers, troubleshooting): see docs/INSTALL.zh.md (Chinese).
# A. dsh plugin manager
dsh plugin --profile web add /path/to/dsh-opencode-client
# B. helper script: symlink + dependency + bundle selection + a starter server row
bash scripts/install-into-profile.sh http://192.168.4.50:4096 n100
or add it manually to the profile and select it as a bundle:
{
"dependencies": { "dsh-opencode-client": "file:/path/to/dsh-opencode-client" },
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-opencode-client"] } }
}
Restart dsh web afterwards: the bundle selection is composed at startup.
Configuration
- id: opencode-client
name: dsh-opencode-client
config:
servers:
# OpenCode 2.x: start the server with OPENCODE_SERVER_PASSWORD=<secret> and repeat
# the same value in `password` (HTTP Basic auth, user "opencode").
- id: n100
label: n100 opencode 2.x
url: http://192.168.4.50:4096
apiVersion: auto # auto (probe GET /api/info) | 2 (v1 is rejected)
password: "<OPENCODE_SERVER_PASSWORD>"
# directory: /home/yhuan/workspace # default remote dir when the caller does not give one
# agent: plan # default OpenCode agent for delegation
# model: deepseek/deepseek-chat # default model "provider/model"; v2 also "provider/model#variant"
permission: ask # ask (default, dsh approval card) | allow | reject
question: ignore # ignore (default: keep pending on the board + notify) | reject (dismiss, unattended)
pathMap: # only when local and remote path layouts differ
- { from: /home/yhuan, to: /home/yhuan }
routing: # multi-server subagent dispatch (default: on when servers > 1)
providerName: opencode-auto
policy: [directory, sticky, least-busy, round-robin]
sticky: true # keep one parent agent on the server that accepted its first child
failover: true # try the next candidate when a start fails before publication
apiVersion: auto (the default) asks GET /api/info once per server. A 401 means the password is
missing or wrong; any other probe failure is recorded on server.versionProbe (logged once) and
surfaces as a clear error. A server that answers as v1 is rejected with
opencode.v1_unsupported. Force apiVersion: 2 to skip probing. Sanity-check with
curl -u opencode:$OPENCODE_SERVER_PASSWORD http://host:4096/api/info.
Register as a native subagent
To expose an OpenCode server as a native dsh subagent, add a tool row:
- insert:
- id: tool-opencode-n100
name: "@deepseek-ai/dsh-tool-subagent"
config:
provider: opencode-n100 # "opencode-" + server id
maxDepth: provider-managed
toolName: opencode_subagent_n100
Multiple servers: opencode-auto
opencode-<server> providers are pinned to one server, so a tool row always dispatches to the
same machine. When more than one server is configured the plugin also registers a routed provider
opencode-auto (configurable through routing), which chooses per start:
directory— a server whosedirectorycovers the child cwd (only meaningful when servers declaredirectory);sticky— the server that accepted this parent agent's first child (one parent → one machine);least-busy— fewest running sessions (/session/active), ties rotate;round-robin— rotate through the remaining candidates.
A start that fails before the run is published (unreachable, 5xx, timeout) falls through to the
next candidate when failover: true; the chosen server is appended to the session title
(dsh subagent: <label> @n100) and logged. Expose it as a tool row:
- insert:
- id: tool-opencode-auto
name: "@deepseek-ai/dsh-tool-subagent"
config:
provider: opencode-auto
maxDepth: provider-managed
toolName: opencode_subagent_auto
Set directory per server to enable directory routing (e.g. machines with different mount roots);
without it, routing falls back to sticky / least-busy / round-robin. Continuation is not routed —
a remote session id belongs to one server — so keep using the pinned tools or pass server to
opencode_subagent when resuming.
Subagent seam
The native opencode_subagent_<server> tools plug into dsh's ctx.subagents provider seam.
See docs/subagent-seam.md for the contract, our capability
mapping, and the applied optimizations (parent-agent attribution, event-driven wait,
idempotent dispose). Both opencode_subagent and the native provider share one
session-run lifecycle (lib/session-run.js): same session creation, interaction
tracking, async prompt + SSE completion wait and abort handling. Native subagent sessions are
titled dsh subagent: <label> so they are identifiable in the plugin page (which now
also shows session ids and the active tool of running servers). The provider reports
stopReason faithfully — finish=length becomes max-tokens and content-filter becomes
refusal, so dsh's settlement notice says "ran out of room" / "declined the task" instead of a
generic completion. With multiple servers, opencode-auto routes each child (see above).
Documentation
- ARCHITECTURE.md — module map, data flows, design decisions
- docs/ARCHITECTURE.zh.md — 中文架构(与 ARCHITECTURE.md 对应)
- docs/TOOLS.zh.md — 中文工具总览:28 个
opencode_*工具、参数、只读/可变 - COMPATIBILITY.md — dsh / OpenCode compatibility matrix and versioning policy
- CONTRIBUTING.md — dev setup, tests, commit/PR and release policy
- SECURITY.md — supported versions and private vulnerability reporting
- docs/opencode-v2-migration.zh.md — measured OpenCode 2.3.0 gaps and the phased migration plan, implemented across 0.2.0–0.7.1
- docs/opencode-v2-deeper-integration.zh.md — measured survey of the 100 unused OpenCode 2.3.0 endpoints and the candidate deeper-integration roadmap (inbox/steer, revert checkpoints, worktrees, stats, PTY, reverse MCP)
- docs/subagent-seam.md — dsh subagent provider contract
- docs/chat-ui-proposal.md — in-page remote-session chat proposal
- scripts/e2e-live.mjs — live acceptance run against real OpenCode 2 servers (offline checks stay
npm test/npm run check) - README.zh.md · TODO.md · CHANGELOG.md
Ecosystem
| Project | Role |
|---|---|
| dsh-remote-hub | Hub side: one dsh Web UI for every backend — reverse proxy, managed SSH tunnels, top-bar switcher, remote subagent providers. |
| dsh-remote-agent | Remote side: runs in each backend dsh web and publishes its launch token + identity so the hub needs no manual token copy. |
| dsh-opencode-client (this repo) | Sidecar: treats remote opencode serve instances as a dsh subagent backend and client (sessions, delegation, catalogs) — independent of dsh remotes. |
Compatibility & versioning
See COMPATIBILITY.md for the test matrix and versioning policy.
| Component | Version | Status |
|---|---|---|
| dsh | >=0.2.1-rc.2 (verified against 0.2.2-rc.5) |
supported |
| OpenCode 2.x (v2 API) | /api/* + HTTP Basic auth (verified against 2.4.2; 2.3.0+ expected) |
supported end to end |
| OpenCode 1.x (v1 API) | any | rejected with opencode.v1_unsupported |
The plugin follows independent semantic versioning and is not published to npm (install from
git or a local path). Current release: 1.1.2 (annotated tag v1.1.2): the observe page and settings share one card
system, remotes are editable in the UI (label / url / password, never echoing the password), and
permission requests are observable (counts, answer source, recent actions, "权限 N · 自动 M" chip);
it also fixes the settings section going blank and the promptFailureMessage ReferenceError.
Previous line, 1.1.1: the observe page fills
in progressively instead of mounting after /insights, every poll runs on one client scheduler
(board, insights, activity, skills, usage), async blocks reserve their final height on the first
frame, and the host serves those reads through SWR + a startup warm-up (cold /insights ~9s → warm
~0.6s). It also ships the 1.1.0 version/update chip plus the question/board fixes. The 1.0.0 line removed the v1 API and moved the transport to
@opencode/client pinned to 2.4.2 (one client per
server; upgrades are deliberate, independent releases); it also included the untagged 0.8.0
(observation trust) and 0.9.0 (insights/activity) changes. The pin policy, SemVer scope and
version matrix live in COMPATIBILITY.md; historical v1→v2 migration notes
are kept in docs/opencode-v2-migration.zh.md.
Notes
- The remote OpenCode server must be reachable from the dsh host;
opencode servebinds127.0.0.1by default — bind0.0.0.0or put it behind an SSH tunnel. OpenCode 2 requiresOPENCODE_SERVER_PASSWORDon the serve process and the same value in the pluginpassword; a mismatch fails the probe with a 401 hint. - Session continuation is done through the OpenCode HTTP API; native external subagents still execute once (matching Codex/Claude Code backends).
- Interactive questions asked by the remote agent are forwarded to dsh's user-question UI when the
run was started by
opencode_subagent(an agent is in scope); without a dsh run they stay pending on the board's "needs you" row until you answer in the session (question: rejectdismisses them instead, for unattended deployments). The same bridge answers typed forms. - Permission cards need a tool-initiated run: approval bridging uses the calling agent; a
delegation started over the HTTP endpoint (no agent in scope) falls back to
allow/reject(once/always/reject). - Multiple servers are configured as an array and aggregated by the client (opencode itself has no server-side federation); each server must expose the OpenCode 2 API.
- A shared OpenCode server is shared state: every dsh/OpenCode client connected to it can claim
and answer a pending form or permission. If a question card flashes and disappears, another
client on that server is dismissing it (typically a
question: rejectdeployment or an older plugin/web build) — not the local plugin. - Permission/question requests are answered while a delegated run is active: SSE events are handled immediately, with a 15s polling fallback when the stream is unavailable.
- The plugin page shows
live(SSE connected) and the number of currently running sessions. - OpenCode 2 transport: requests go through
@opencode/client(2.4.2), which owns paths, Basic auth and response envelopes;lib/oc-client.jscaches one client per server. The remaining v2 gaps (opencode_share,opencode_tools) fail with an explicit "not available on OpenCode 2" message rather than empty data; content search and session todos are restored with v2-native fallbacks (see Features and COMPATIBILITY.md).
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38385
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37218
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28812
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 9804
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6039
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4659
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.