@prevalentware/opencode-goal-plugin 0.1.30 → 0.1.31
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/README.md +45 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,18 @@ Common use cases:
|
|
|
38
38
|
|
|
39
39
|
## Install
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Choose the instructions that match the CLI you run:
|
|
42
|
+
|
|
43
|
+
| OpenCode version | How to identify it | Instructions |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| OpenCode 1 stable | You run `opencode` and `opencode --version` prints `1.x` | [OpenCode 1](#opencode-1-stable) |
|
|
46
|
+
| OpenCode 2 beta | You run `opencode2` | [OpenCode 2](#opencode-2-beta) |
|
|
47
|
+
|
|
48
|
+
Do not mix the configuration formats. OpenCode 1 uses `plugin` and `tui.json`; OpenCode 2 uses `plugins` and the global `cli.json`.
|
|
49
|
+
|
|
50
|
+
### OpenCode 1 Stable
|
|
51
|
+
|
|
52
|
+
Install for the current project:
|
|
42
53
|
|
|
43
54
|
```bash
|
|
44
55
|
opencode plugin @prevalentware/opencode-goal-plugin
|
|
@@ -52,51 +63,53 @@ opencode plugin -g @prevalentware/opencode-goal-plugin
|
|
|
52
63
|
|
|
53
64
|
OpenCode detects both package entrypoints and writes the plugin into the server and TUI config targets.
|
|
54
65
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
The package also supports OpenCode 2 preview `0.0.0-next-17055`. Add it to the V2 server and TUI plugin lists:
|
|
66
|
+
For manual installation, add the package to both V1 config files.
|
|
58
67
|
|
|
59
68
|
`opencode.json`:
|
|
60
69
|
|
|
61
70
|
```json
|
|
62
71
|
{
|
|
63
|
-
"
|
|
72
|
+
"plugin": ["@prevalentware/opencode-goal-plugin"]
|
|
64
73
|
}
|
|
65
74
|
```
|
|
66
75
|
|
|
67
|
-
|
|
76
|
+
`tui.json`:
|
|
68
77
|
|
|
69
78
|
```json
|
|
70
79
|
{
|
|
71
|
-
"
|
|
80
|
+
"plugin": ["@prevalentware/opencode-goal-plugin"]
|
|
72
81
|
}
|
|
73
82
|
```
|
|
74
83
|
|
|
75
|
-
OpenCode 2
|
|
84
|
+
### OpenCode 2 Beta
|
|
76
85
|
|
|
77
|
-
|
|
86
|
+
Use this section only when running `opencode2`. Plugin release `0.1.30` and newer supports OpenCode 2 preview `0.0.0-next-17055` while remaining compatible with OpenCode 1.
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
Add the package to both V2 plugin lists:
|
|
80
89
|
|
|
81
90
|
`opencode.json`:
|
|
82
91
|
|
|
83
92
|
```json
|
|
84
93
|
{
|
|
85
|
-
"
|
|
94
|
+
"plugins": ["@prevalentware/opencode-goal-plugin"]
|
|
86
95
|
}
|
|
87
96
|
```
|
|
88
97
|
|
|
89
|
-
|
|
98
|
+
`~/.config/opencode/cli.json`:
|
|
90
99
|
|
|
91
100
|
```json
|
|
92
101
|
{
|
|
93
|
-
"
|
|
102
|
+
"plugins": ["@prevalentware/opencode-goal-plugin"]
|
|
94
103
|
}
|
|
95
104
|
```
|
|
96
105
|
|
|
106
|
+
OpenCode 2 does not read the V1 `tui.json` file. The server entrypoint comes from `opencode.json`, while the sidebar and palette integration come from `~/.config/opencode/cli.json`.
|
|
107
|
+
|
|
108
|
+
OpenCode 2 plugin APIs are still beta. This package pins its V2 development contract to the preview version above; later previews may require a compatible plugin update. V2 currently supports the goal command, tools, persistent state, usage accounting, idle continuation, Plan-mode safety, and TUI sidebar/palette integration. Goal-specific compaction context and recovery of already-running child sessions after a plugin restart remain V1-only because the current V2 plugin context does not expose equivalent hooks or history queries.
|
|
109
|
+
|
|
97
110
|
## Options
|
|
98
111
|
|
|
99
|
-
|
|
112
|
+
In OpenCode 1, server options use the package-and-options tuple in `opencode.json`:
|
|
100
113
|
|
|
101
114
|
```json
|
|
102
115
|
{
|
|
@@ -122,6 +135,24 @@ Server options can be configured in `opencode.json`:
|
|
|
122
135
|
}
|
|
123
136
|
```
|
|
124
137
|
|
|
138
|
+
In OpenCode 2, use the plugin object form instead:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"plugins": [
|
|
143
|
+
{
|
|
144
|
+
"package": "@prevalentware/opencode-goal-plugin",
|
|
145
|
+
"options": {
|
|
146
|
+
"auto_continue": true,
|
|
147
|
+
"max_auto_turns": 25,
|
|
148
|
+
"default_token_budget": 200000,
|
|
149
|
+
"restricted_agents": ["plan"]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
125
156
|
Defaults:
|
|
126
157
|
|
|
127
158
|
- `auto_continue`: `true`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prevalentware/opencode-goal-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "OpenCode goal plugin that adds Codex-style long-running goal mode, /goal commands, persistence, and TUI status for AI coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|