opencode-goal-plugin 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.1.10 — 2026-05-30
6
+
7
+ - Fix `experimental.chat.system.transform` to merge the goal continuation block into the primary system entry instead of pushing a separate one. Prevents `"System message must be at the beginning."` errors on strict-template backends (Qwen on vLLM, several Llama.cpp/Mistral templates). See issue #1.
8
+
3
9
  ## 0.1.9 — 2026-05-18
4
10
 
5
11
  > This release makes the goal plugin much more reliable for real unattended use. Goals now persist across restarts, recover in a safe paused state, expose better status/history visibility, and use smarter no-progress detection to avoid premature stalls. It also hardens persistence with atomic writes, stricter file permissions, and regression tests around corrupt or missing state.
package/README.md CHANGED
@@ -4,7 +4,7 @@ An experimental session-scoped `/goal` command for [OpenCode](https://opencode.a
4
4
 
5
5
  Set a goal and the plugin keeps it in context, auto-continues the session whenever the assistant goes idle, and stops when the goal is marked complete, a blocker is reported, or a safety limit is reached.
6
6
 
7
- Compatibility: tested against OpenCode 1.15.4. The plugin relies on experimental OpenCode hooks; pin or re-test against your OpenCode version before using it for unattended long-running work.
7
+ Compatibility: tested against OpenCode 1.15.11. The plugin relies on experimental OpenCode hooks; pin or re-test against your OpenCode version before using it for unattended long-running work.
8
8
 
9
9
  ## Install
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-goal-plugin",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Session-scoped /goal workflow for OpenCode.",
5
5
  "type": "module",
6
6
  "main": "./src/goal-plugin.js",
@@ -1059,15 +1059,19 @@ export const GoalPlugin = async ({ client }, pluginOptions = {}) => {
1059
1059
  if (goal.stopped) return
1060
1060
  if (output.system.some((block) => block.includes("<goal_objective>"))) return
1061
1061
 
1062
- output.system.push(
1063
- [
1064
- buildGoalBlock(goal),
1065
- "Keep working until the goal is fully satisfied.",
1066
- "When fully satisfied, end the response with `[goal:complete]`.",
1067
- "If user input is required, explain the blocker in the line immediately before `[goal:blocked]`.",
1068
- buildLimitWarning(goal),
1069
- ].filter(Boolean).join("\n"),
1070
- )
1062
+ const goalBlock = [
1063
+ buildGoalBlock(goal),
1064
+ "Keep working until the goal is fully satisfied.",
1065
+ "When fully satisfied, end the response with `[goal:complete]`.",
1066
+ "If user input is required, explain the blocker in the line immediately before `[goal:blocked]`.",
1067
+ buildLimitWarning(goal),
1068
+ ].filter(Boolean).join("\n")
1069
+
1070
+ if (output.system.length === 0) {
1071
+ output.system.push(goalBlock)
1072
+ } else {
1073
+ output.system[0] = `${output.system[0]}\n\n${goalBlock}`
1074
+ }
1071
1075
  },
1072
1076
  }
1073
1077
  }