
Security News
Rust 1.100 Will Add Dependency Cooldowns to Cargo
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.
opencode-plugin-goal-dsh
Advanced tools
DeepSeek Harness (dsh) style goal mode for OpenCode: /goal command, persistent objectives, autonomous same-session continuation, evidence-gated completion
把 DeepSeek Harness (dsh) 的 packages/goal/ 目标模式移植到 OpenCode 的插件。
给 AI coding agent 一个 /goal 斜杠命令和一组 goal 工具:设定一个持久目标后,agent 在同一会话里自动一轮一轮续跑,直到目标带着证据完成、被阻塞、或轮次用尽。
参考实现是 dsh 的四个子包(goal / goal-round-driver / tool-goal / command-goal),状态机、CAS 修订、权限模型、防作弊阈值都按原设计移植;宿主侧改用 OpenCode 的 plugin hooks。
/goal <objective> 建目标,/goal edit|pause|resume|clear 管理,裸 /goal 查状态get_goal / create_goal / update_goalsession.idle)自动续跑,注入 <goal_round> 轮次提示把 src/index.ts 复制到 ~/.config/opencode/plugins/goal-dsh.ts(全局)或项目的 .opencode/plugins/ 下即可,重启 opencode 生效。
插件源码留在本仓库,全局目录只放一个转发文件:
// ~/.config/opencode/plugins/goal-dsh.ts
export { GoalDshPlugin } from "<本仓库的绝对路径>/src/index.ts"
/goal 把所有测试修绿,npm test 全过
/goal # 查看当前目标状态
/goal pause # 暂停(不删除)
/goal resume # 继续(重启后恢复也用它)
/goal edit <新目标> # 改目标描述
/goal clear # 清除
模型侧也可以在人类请求是长任务时自行调用 create_goal(无需用户说"建个目标"),琐碎单轮活不会建。
插件第二参数可覆盖默认值(npm 安装方式支持 [name, options] 元组):
| 选项 | 默认 | 说明 |
|---|---|---|
maxGoalRounds | 25 | 自动续跑轮次上限 |
blockedAfterConsecutiveRounds | 3 | blocked 前需持续的最低轮数 |
autoContinue | true | 空闲自动续跑开关 |
minRoundIntervalMs | 1500 | 两轮之间最小间隔(防抖) |
maxConsecutiveErrors | 3 | 连续出错熔断次数 |
状态持久化在 ~/.local/share/opencode-goal-dsh/state.json(遵循 XDG_DATA_HOME)。
| dsh 子包 | 本插件实现 |
|---|---|
goal/(状态机 + CAS + 投影) | 每会话投影,JSON 原子写持久化 |
goal-round-driver/(续跑调度) | session.idle hook → client.session.promptAsync |
tool-goal/(模型工具 + 权限) | tool hook 注册三个工具;直人轮次判定用 <goal_round> 标记替代 dsh 的消息 source |
command-goal/(/goal 命令) | config hook 注入命令模板 |
clear 通过 update_goal 工具执行(OpenCode 自定义命令必须经过模型,无法纯本地执行)MIT
目标模式的设计与部分提示词文本移植自 DeepSeek Harness (dsh) 的 packages/goal/(MIT, Copyright (c) 2026 DeepSeek),宿主适配层为原创实现。
FAQs
DeepSeek Harness (dsh) style goal mode for OpenCode: /goal command, persistent objectives, autonomous same-session continuation, evidence-gated completion
The npm package opencode-plugin-goal-dsh receives a total of 3 weekly downloads. As such, opencode-plugin-goal-dsh popularity was classified as not popular.
We found that opencode-plugin-goal-dsh demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.