dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
OpenCode 子智能体插件,用于 DeepSeek Harness。
把一个任务委派给本机或**远端(SSH)**的 OpenCode;OpenCode 用自己的模型和工具执行,Harness 负责验收。
opencode:可被标准子代理工具调用。opencode_delegate_<name>:先询问用户选择模型,然后默认在后台执行并返回 job id;完成后通知,用 job_output 收集结果。传 wait: true 可同步等待最终文本。/oc-<name> <task>:直接执行,不经过模型选择。opencode_targets:在对话中列出、添加、修改、删除、测试目标。dsh-opencode-subagent:引导模型在合适时委派,模糊请求先询问用户选择目标。opencode acp;不限制版本。opencode 在 PATH 中,或填写可执行文件的绝对路径。Windows 桌面版自带的 opencode-cli.exe 通常不在 PATH,需要填绝对路径。opencode 在远端 PATH 中。远端需为 Linux 或 macOS。# GitHub(推荐)
dsh plugin --profile <profile> add github:NewSpringWei/dsh-subagent-opencode
# 预构建 tarball(安装更快,不需要本地构建)
dsh plugin --profile <profile> add https://github.com/NewSpringWei/dsh-subagent-opencode/releases/download/v0.1.0/dsh-subagent-opencode-0.1.0.tgz
# 本地 checkout(开发)
dsh plugin --profile <profile> add file:<path-to-plugin>/code
安装后打开「插件 → OpenCode 子智能体」配置目标,也可以直接在对话里用 opencode_targets 工具管理。
- name: dsh-subagent-opencode
config:
providers:
- name: local
mode: local
command: opencode
args: ['acp']
permission: allow
- name: remote
mode: remote
sshHost: user@host
remoteCwd: /home/user/workspace
permission: allow
每个 providers 条目会注册一个子代理 provider、一个委派工具和一个 /oc-<name> 命令。配置保存后立即生效,不需要重启 dsh。
委派默认后台执行,不阻塞当前会话:调用后立即返回 job id,任务完成后通过后台任务通知提醒,
用 job_output <job-id> 读取最终结果,job_kill <job-id> 可终止。需要当场拿到答案时传 wait: true。
目标卡片上的「测试」按钮会启动目标并完成 ACP 握手,用来确认连接是否正常。
| 字段 | 默认 | 说明 |
|---|---|---|
name | 必填 | 实例名,用于 provider、工具名和历史记录 |
mode | local | local 或 remote |
command | opencode | 启动 OpenCode 的命令;远端模式下为远端命令 |
args | ['acp'] | 命令参数 |
sshHost | — | SSH 目标,remote 必填 |
sshArgs | ['-o','BatchMode=yes'] | SSH 参数 |
remoteOs | linux | 远端系统;linux/darwin 走 POSIX,windows 未验证 |
localCwd | 临时目录 | 远端模式下 SSH 子进程的本机工作目录 |
remoteCwd | — | 远端工作目录,传给 OpenCode 的 session/new |
permission | allow | 自动应答权限请求:allow 或 reject |
model | — | 可选固定模型;默认由委派工具询问用户 |
env | {} | 子进程环境变量 |
disposeEofGraceMs | 6000 | 子进程关闭前的宽限时间 |
disposeGraceMs | 3000 | 终止子进程的等待上限 |
模型列表来自 OpenCode session/new 的 configOptions[id=model],一次列出全部可用模型:上次使用的模型排第一,其余按使用次数、名称排序;选项附带上下文、输出上限和输入模态。选择记录保存在 Harness 存储中。
opencode acp 即可。An OpenCode subagent plugin for DeepSeek Harness.
Delegate a task to a local or remote (SSH) OpenCode instance. OpenCode runs it with its own models and tools; the Harness reviews the result.
opencode: callable by standard subagent tools.opencode_delegate_<name>: asks the user to pick a model, then runs in the background and returns a job id by default; it notifies you when finished and you read the result with job_output. Pass wait: true to block until the final text./oc-<name> <task>: runs immediately without the model picker.opencode_targets: list, add, update, remove, and test targets from a conversation.dsh-opencode-subagent: guides the model to delegate when appropriate and to ask which target to use for ambiguous requests.opencode acp); no version pin.opencode on PATH, or an absolute path. The Windows desktop build ships opencode-cli.exe outside PATH, so use its absolute path.opencode on the remote PATH, and a Linux or macOS remote.# GitHub (recommended)
dsh plugin --profile <profile> add github:NewSpringWei/dsh-subagent-opencode
# prebuilt tarball (faster, no local build)
dsh plugin --profile <profile> add https://github.com/NewSpringWei/dsh-subagent-opencode/releases/download/v0.1.0/dsh-subagent-opencode-0.1.0.tgz
# local checkout (development)
dsh plugin --profile <profile> add file:<path-to-plugin>/code
Open Plugins → OpenCode subagent to configure targets, or manage them from a conversation with opencode_targets.
- name: dsh-subagent-opencode
config:
providers:
- name: local
mode: local
command: opencode
args: ['acp']
permission: allow
- name: remote
mode: remote
sshHost: user@host
remoteCwd: /home/user/workspace
permission: allow
Each entry registers a provider, a delegate tool, and an /oc-<name> command. Changes apply immediately; no dsh restart is needed.
Delegations run in the background by default and do not block the current session: the tool returns a job id immediately, a background-job notification arrives when the run finishes, and job_output <job-id> reads the final result (job_kill <job-id> stops it). Pass wait: true to block until the final text.
The Test button on a target card starts the target and runs the ACP handshake to verify the connection.
| Field | Default | Meaning |
|---|---|---|
name | required | Instance name used by the provider, tool, and history |
mode | local | local or remote |
command | opencode | Launch command; the remote command in remote mode |
args | ['acp'] | Command arguments |
sshHost | — | SSH destination; required for remote |
sshArgs | ['-o','BatchMode=yes'] | SSH arguments |
remoteOs | linux | Remote OS; linux/darwin use POSIX, windows is unverified |
localCwd | temp dir | Local cwd for the SSH child process in remote mode |
remoteCwd | — | Remote working directory passed to session/new |
permission | allow | Auto-answer permission requests: allow or reject |
model | — | Optional fixed model; the delegate tool asks the user by default |
env | {} | Child process environment |
disposeEofGraceMs | 6000 | Grace before the child is closed |
disposeGraceMs | 3000 | Upper bound for terminating the child |
The model list comes from session/new (configOptions[id=model]). One screen lists every available model: the previously used model first, then by pick count and name; each option carries its context size, output limit, and input modalities. Choices are stored in Harness storage.
opencode acp support.