Repository navigation
Description
Description
Environment
- OpenCode v2.1.4 (npm
latest), macOS, Node v24.22.0, npm 12.2.0 - Docs page: https://opencode.ai/v2/docs/build/plugins/cli → "Publish and load"
(minor gaps also touch https://opencode.ai/v2/docs/plugins)
1. The example declares peer ranges that cannot install
The docs' package.json example says:
"peerDependencies": {
"@opentui/core": ">=0.6.6",
"@opentui/solid": ">=0.6.6",
"solid-js": ">=1.9.0"
}but @opencode/[email protected] itself declares:
"peerDependencies": {
"solid-js": ">=1.9.0",
"@opentui/core": ">=0.6.8",
"@opentui/solid": ">=0.6.8",
"@opencode/theme": "2.1.4"
}Following the docs and pinning any @opentui/* version in [0.6.6, 0.6.8) — which the docs'
range explicitly allows — hard-fails npm resolution:
$ npm install
npm error While resolving: @opencode/[email protected]
npm error Found: @opentui/[email protected]
npm error Could not resolve dependency:
npm error peerOptional @opentui/core@">=0.6.8" from @opencode/[email protected]
npm error Conflicting peer dependency: @opentui/[email protected]
npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps
Reproduction: a minimal package with dependencies: { "@opencode/plugin": "2.1.4" } and the
docs' peerDependencies verbatim, then npm install @opentui/[email protected]. With no explicit
pin the install happens to succeed (npm picks 0.6.8), which makes the bad range easy to miss
until a consumer pins a version — by which point they hit a confusing ERESOLVE pointing at
@opencode/plugin's peer, not at the docs.
Suggested fix: use >=0.6.8 (or simply mirror @opencode/plugin's own peer ranges), and
add the missing "@opencode/theme" peer the package declares.
2. Minor gaps in the same docs (docs-only; behavior is tracked elsewhere)
/v2/docs/pluginssays a configured local path loads "the directory'sserverorindex
module" but never says what happens when there is neither: on 2.1.4 the directory is
silently skipped (no log line, no warning), andpackage.jsonmain/exportsare not
consulted for config-path directories. The behavior itself is already tracked in
#52300 and #58574 (also #46551) — this is only a docs request:
state the required layout (index.ts/server.tsat the directory root) and that a missing
entrypoint is dropped silently until plugins: local plugin directory ignores package.json main and is silently skipped without a root entrypoint #52300 lands.- The discovery examples show only
tui.ts, buttui.tsxworks identically (verified on
2.1.4); both spellings appear in the wild, so mentioning both would save authors a guess.
Plugins
No response
OpenCode version
2.1.4
Steps to reproduce
No response
Screenshot
No response
Operating System
macOS 27.0.1
Terminal
iTerm2
Activity
opencode-agent commentedon Oct 24, 2026
Thanks for the detailed report. I can confirm this. With
@opencode/[email protected]as a dependency and the docs'peerDependenciescopied exactly,npm install @opentui/[email protected]fails with the ERESOLVE you quoted (Conflicting peer dependency: @opentui/[email protected] … peerOptional @opentui/core@">=0.6.8" from @opencode/[email protected]). The script below reproduces it.It's still the same on the latest
dev(13a615b). The "Publish and load" example still says>=0.6.6and still has no@opencode/themepeer, while@opencode/pluginrequires>=0.6.8. The minimum was probably raised in the OpenTUI 0.6.8 upgrade (#58380), and the docs example wasn't updated with it.Your other two points are also noted:
index/serverentry is skipped without any warning. The behaviour itself is tracked in plugins: local plugin directory ignores package.json main and is silently skipped without a root entrypoint #52300, Plugin directory without an entrypoint is dropped silently (V2) #58574 and plugin: configured local plugin file paths silently dropped since #46105 #46551.tui.tsxisn't mentioned alongsidetui.ts.Reproduction script (repro.sh)
Run it:
bash repro.shrenjianguojinqianfan commentedon Oct 25, 2026
I'd like to take this one. Preparing a docs PR that aligns the peer ranges with what @opencode/plugin declares (>=0.6.8, plus the missing @opencode/theme peer), mentions tui.tsx alongside tui.ts, and states that a configured directory without a root index or server module is skipped without a warning.
docs(plugins): align package.json peers with @opencode/plugin
docs(plugins): align package.json peers with @opencode/plugin