@prevalentware/opencode-goal-plugin 0.1.66 → 0.1.67
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 +6 -4
- package/package.json +7 -7
- package/src/tui.ts +9 -8
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Choose the instructions that match the CLI you run:
|
|
|
43
43
|
| OpenCode version | How to identify it | Instructions |
|
|
44
44
|
| --- | --- | --- |
|
|
45
45
|
| OpenCode 1 stable | You run `opencode` and `opencode --version` prints `1.x` | [OpenCode 1](#opencode-1-stable) |
|
|
46
|
-
| OpenCode 2
|
|
46
|
+
| OpenCode 2 | You run `opencode2` | [OpenCode 2](#opencode-2) |
|
|
47
47
|
|
|
48
48
|
Do not mix the configuration formats. OpenCode 1 uses `plugin` and `tui.json`; OpenCode 2 uses `plugins` and the global `cli.json`.
|
|
49
49
|
|
|
@@ -85,9 +85,11 @@ For manual installation, add the package to both V1 config files.
|
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
### OpenCode 2
|
|
88
|
+
### OpenCode 2
|
|
89
89
|
|
|
90
|
-
Use this section
|
|
90
|
+
Use this section when running `opencode2`. The development API packages are kept aligned, and CI checks
|
|
91
|
+
the CLI release pinned by `@opencode/plugin` in `devDependencies` plus the current `@opencode/cli@beta` channel.
|
|
92
|
+
Publishing requires the pinned release smoke test. OpenCode 1 remains supported.
|
|
91
93
|
|
|
92
94
|
Add the package to both V2 plugin lists:
|
|
93
95
|
|
|
@@ -109,7 +111,7 @@ Add the package to both V2 plugin lists:
|
|
|
109
111
|
|
|
110
112
|
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`.
|
|
111
113
|
|
|
112
|
-
OpenCode
|
|
114
|
+
Later OpenCode releases may require a compatible plugin update. V2 currently supports the goal command, tools, persistent state, usage accounting, idle continuation, Plan-mode safety, TUI sidebar/palette integration, goal compaction context, and transcript-based task recovery. Goal compaction context is injected through the V2 `session.compaction` hook on hosts that provide it (newer than beta-19425); on older betas the registration degrades to a no-op. After a plugin or server restart, V2 rebuilds Task-subagent deferral state by replaying each non-closed goal session's persisted transcript, because the V2 plugin context exposes no live child-session query; children that leave no finalized tool entry in the transcript are only observed through live events.
|
|
113
115
|
|
|
114
116
|
## Options
|
|
115
117
|
|
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.67",
|
|
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",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@eslint/js": "^10.0.1",
|
|
70
|
-
"@opencode/client": "
|
|
71
|
-
"@opencode/plugin": "
|
|
72
|
-
"@opencode/schema": "
|
|
73
|
-
"@opencode/theme": "
|
|
74
|
-
"@opentui/core": "0.
|
|
75
|
-
"@opentui/solid": "0.
|
|
70
|
+
"@opencode/client": "2.0.30",
|
|
71
|
+
"@opencode/plugin": "2.0.30",
|
|
72
|
+
"@opencode/schema": "2.0.30",
|
|
73
|
+
"@opencode/theme": "2.0.30",
|
|
74
|
+
"@opentui/core": "0.6.6",
|
|
75
|
+
"@opentui/solid": "0.6.6",
|
|
76
76
|
"@types/bun": "^1.3.13",
|
|
77
77
|
"@types/semver": "^7.8.0",
|
|
78
78
|
"eslint": "^10.3.0",
|
package/src/tui.ts
CHANGED
|
@@ -139,10 +139,10 @@ export function registerSlotV2(context: TuiPluginV2.Context, name: string, rende
|
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* Reads a theme color by trying each candidate path in order, descending into a
|
|
142
|
-
* `default` leaf when the resolved node is a color group.
|
|
142
|
+
* `base` or `default` leaf when the resolved node is a color group.
|
|
143
143
|
*
|
|
144
|
-
*
|
|
145
|
-
* `text.
|
|
144
|
+
* Stable V2 uses `text.base` and `text.muted`; previews use `text.default` and
|
|
145
|
+
* `text.subdued`, while earlier previews and the V1 TUI expose flat
|
|
146
146
|
* keys (`text`, `textMuted`, `primary`). Passing a color *group* as `fg`
|
|
147
147
|
* renders nothing useful, so resolve to a leaf before handing it to OpenTUI.
|
|
148
148
|
*/
|
|
@@ -156,8 +156,9 @@ export function themeColorV2(theme: unknown, ...paths: readonly (readonly string
|
|
|
156
156
|
}
|
|
157
157
|
cursor = (cursor as Record<string, unknown>)[key]
|
|
158
158
|
}
|
|
159
|
-
if (cursor !== null && typeof cursor === "object"
|
|
160
|
-
|
|
159
|
+
if (cursor !== null && typeof cursor === "object") {
|
|
160
|
+
if ("base" in cursor) cursor = cursor.base
|
|
161
|
+
else if ("default" in cursor) cursor = cursor.default
|
|
161
162
|
}
|
|
162
163
|
if (cursor !== undefined && cursor !== null) return cursor
|
|
163
164
|
}
|
|
@@ -166,9 +167,9 @@ export function themeColorV2(theme: unknown, ...paths: readonly (readonly string
|
|
|
166
167
|
|
|
167
168
|
function goalColorsV2(theme: unknown) {
|
|
168
169
|
return {
|
|
169
|
-
text: themeColorV2(theme, ["text", "default"], ["text"]),
|
|
170
|
-
muted: themeColorV2(theme, ["text", "subdued"], ["textMuted"]),
|
|
171
|
-
achieved: themeColorV2(theme, ["text", "feedback", "success"], ["primary"], ["text", "default"], ["text"]),
|
|
170
|
+
text: themeColorV2(theme, ["text", "base"], ["text", "default"], ["text"]),
|
|
171
|
+
muted: themeColorV2(theme, ["text", "muted"], ["text", "subdued"], ["textMuted"]),
|
|
172
|
+
achieved: themeColorV2(theme, ["text", "feedback", "success"], ["primary"], ["text", "base"], ["text", "default"], ["text"]),
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
|