@khalilgharbaoui/opencode-claude-code-plugin 0.57.2 → 0.59.0
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/dist/index.d.ts +22 -4
- package/dist/index.js +1043 -279
- package/dist/index.js.map +1 -1
- package/dist/tui.js +586 -85
- package/dist/tui.js.map +1 -1
- package/package.json +1 -1
- package/skills/claude-code-plugin/SKILL.md +23 -12
package/package.json
CHANGED
|
@@ -202,6 +202,12 @@ reports "the plugin printed garbage over my opencode UI", the answer is to upgra
|
|
|
202
202
|
turn logging off; and when they ask where a WARN went in the TUI, point them at opencode's
|
|
203
203
|
own log or the toast rather than at stderr.
|
|
204
204
|
|
|
205
|
+
On opencode 2 the plugin runs in a separate process whose stderr nobody sees, so WARN and
|
|
206
|
+
ERROR also go to the plugin's own sidebar half over the RPC channel opencode 2 gives a
|
|
207
|
+
plugin between its two halves, and the sidebar half raises the same `claude-code` toast
|
|
208
|
+
under the same limits, in the window the warning came from (measured on 2.0.31). When a 2.x
|
|
209
|
+
user asks where a warning went, it is that toast and the plugin log file; stderr is a pipe.
|
|
210
|
+
|
|
205
211
|
## Environment variables
|
|
206
212
|
|
|
207
213
|
Set variables in the environment that launches opencode, then fully restart it.
|
|
@@ -291,7 +297,7 @@ Same package, same config. 2.x's native key is `plugins` (plural), but it still
|
|
|
291
297
|
- Check the major first with `opencode --version`. `plugin` is read by both majors (recorded in `docs/agents-history.md` #g39); `plugins` is read by 2.x only.
|
|
292
298
|
- Provider settings, lowest precedence first: `provider.claude-code.options` (1.x's spelling, still read on 2.x), `provider.claude-code.settings`, `providers.claude-code.settings` (2.x's own), and the plugin entry's own `options`, which wins over all three. Any option of this plugin can sit in any of them; the plugin entry is the usual home for `accounts`: `{"package": "@khalilgharbaoui/opencode-claude-code-plugin", "options": {"accounts": ["work"]}}`.
|
|
293
299
|
- A local checkout is loaded by pointing `plugins` at its **`dist`** directory, never the repository root: 2.x resolves a configured plugin path as `<dir>/server` or `<dir>/index`.
|
|
294
|
-
- Known 2.x differences:
|
|
300
|
+
- Known 2.x differences: there is no todo panel (2.x has no `todowrite` tool, so the sidebar's progress bar is always the time estimate), `bridgeMcpOauthTokens` finds nothing (2.x's plugin API can activate a stored credential but not read one), and Claude's `EnterPlanMode`, `ExitPlanMode` and `NotebookEdit` calls get no tool row (2.x rejects an unknown tool name). Everything else behaves as on 1.x, including `/btw` answered inside the running turn, a permission prompt not counting against a proxied call's deadline, a stopped turn releasing its parked proxied calls, and warnings shown as toasts: the plugin reads busy and idle off opencode 2's event stream (`session.execution.*`) and sends warnings over its plugin RPC channel (measured on 2.0.22 and 2.0.31). Do not set `hostApi`; the 2.x entrypoint sets it, and forcing it on 1.x breaks every proxied tool call.
|
|
295
301
|
- Every form the plugin raises is answered through 2.x's own `Form` surface rather than a question tool, which changes nothing the operator does. The account-switch form and the plan-mode approval were measured live on 2.0.22, and the `subagentDispatch` form (including `Customise…`, `Per type…` accounts and `Same as last time` across a restart) on 2026-10-08. The by-hand account carry and the `accountGroups` guard were measured live there the same day: both behave exactly as on 1.x.
|
|
296
302
|
|
|
297
303
|
#### V2 MCP and Code Mode
|
|
@@ -988,17 +994,22 @@ row gets a third line: the same progress line the viewed session gets above the
|
|
|
988
994
|
under a `Main Progress` heading while its turn runs (and 15 s after). That line is a ten-cell
|
|
989
995
|
`▰▱` bar, two spaces, then the todo list's completed fraction with `2/4` when the session has
|
|
990
996
|
one (opencode 1 only; opencode 2 exposes no todo list to a TUI plugin), else the turn's
|
|
991
|
-
elapsed over its estimated total (`1m02s/~2m30s
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
997
|
+
elapsed over its estimated total (`1m02s/~2m30s`), else no bar until three turns of that
|
|
998
|
+
agent and model (or of that agent across its other models) are on record; plus the call
|
|
999
|
+
count (when neither is shown) and the running tool. The estimate is a log-normal fitted to
|
|
1000
|
+
this agent and model's recorded turns in
|
|
1001
|
+
`$XDG_STATE_HOME/opencode-claude-code-plugin/turn-history.json` (written at every served
|
|
1002
|
+
result), weighted toward a prompt of about this length, this effort (another effort's turns
|
|
1003
|
+
at half weight, scaled by the measured duration ratio) and recent turns, borrowing the
|
|
1004
|
+
agent's other models for a new model and pulled toward this session's own earlier turns. It
|
|
1005
|
+
is conditioned on the turn's elapsed time, its tool calls and the output tokens it has
|
|
1006
|
+
generated, which the provider half writes per API call to `turn-progress.json` beside it.
|
|
1007
|
+
The bar's shades are the band (where the turn likely ends, calibrated on the estimate's own
|
|
1008
|
+
past misses), a turn waiting on a foreground subagent is floored at what that subagent has
|
|
1009
|
+
left, and past every recorded turn the bar is full in the warning colour. A turn that ended
|
|
1010
|
+
on a failed tool is never read. How far to trust it: `/claude-code-doctor`'s `Progress
|
|
1011
|
+
estimate` section (per agent and model: turns, typical, `off by`, `outran`, `in band`). No
|
|
1012
|
+
model call, no option, nothing read from the prompt but its length.
|
|
1002
1013
|
Clicking a row opens the subagent's session; `up` returns to the parent. More than two
|
|
1003
1014
|
rows fold behind a `▼` heading. Setup: nothing on opencode 2; on opencode 1 the
|
|
1004
1015
|
`tui.json` line under Minimum install. If the section never appears on 1.x, that line is
|