Skip to content

docs(plugins): align package.json peers with @opencode/plugin - #58862

Open
renjianguojinqianfan wants to merge 1 commit into
anomalyco:devfrom
renjianguojinqianfan:docs/plugin-package-peers
Open

renjianguojinqianfan wants to merge 1 commit into
anomalyco:devfrom
renjianguojinqianfan:docs/plugin-package-peers

Conversation

@renjianguojinqianfan

@renjianguojinqianfan renjianguojinqianfan commented Oct 25, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #58807

Type of change

  • Documentation

What does this PR do?

The "Publish and load" example in the TUI plugin docs declared @opentui/* peer ranges (>=0.6.6) below what @opencode/plugin@latest (2.2.3) requires (>=0.8.0), so following the docs could fail npm install with ERESOLVE. The example now uses the ranges the package declares.

Review feedback noted that @opencode/theme is optional in @opencode/plugin (only plugins that import it need it) and that the package publishes it as an exact version, so including it in the example would break the example again on the next release; it is left out.

The docs also state that a configured plugin directory with no root server (or index) or gui-experimental module is skipped without a warning, which is the current behavior.

How did you verify your code works?

Checked the example against the published @opencode/plugin@latest package.json — the peer ranges now match exactly, which removes the ERESOLVE from the issue. The silent-skip behavior was read from packages/core/src/config/plugin/source.ts, which drops a directory with no server or GUI entry without logging. Rebased onto dev, where the same example had drifted back to >=0.6.6. Docs-only otherwise.

Screenshots / recordings

N/A (docs only)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 25, 2026

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @opentui/* peer ranges now match what @opencode/plugin declares (>=0.6.8), which fixes the ERESOLVE from #58807. I checked the two added notes against packages/plugin/src/host.ts and both are accurate. Nothing was run because this is docs-only.

Public API: unchanged (documentation only).

One concern, in an inline comment: the exact @opencode/theme pin in the example will itself cause an ERESOLVE as soon as @opencode/plugin@latest moves past 2.1.4.

Related: #46551, #55084

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exact @opencode/theme pin is gone, so the example no longer breaks again on the next release. The remaining peer ranges match what @opencode/plugin declares. This is docs-only, so nothing was run. Public API: unchanged. No further concerns.

Fixes anomalyco#58807

The publish example's peer ranges were below what @opencode/plugin
requires, so following the docs could fail npm resolution. Use the
ranges the package declares. The optional @opencode/theme peer is
left out: an exact pin would break the example again on the next
release, and only plugins that import the package need it.

Also note that a configured directory with no root `server` (or
`index`) or `gui-experimental` module is skipped without a warning.
@renjianguojinqianfan

Copy link
Copy Markdown
Author

Bumping this for review — small docs-only change (2 files, +4/-3), rebased onto dev.

The "Publish and load" example in the TUI plugin docs declared @opentui/* peer ranges below what @opencode/plugin@latest (2.2.3) requires, so following the docs could fail npm install with ERESOLVE. On dev the example had drifted back to >=0.6.6; it now matches what the package declares.

The docs also state that a configured plugin directory with no root server (or index) or gui-experimental module is skipped without a warning, which is the current behavior in packages/core/src/config/plugin/source.ts.

Heads up that this repo's automated cleanup closes PRs older than a month with fewer than 2 reactions, so it would be swept on 2026-11-25 without review. Happy to adjust anything in the meantime. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Plugin package.json example's peer ranges cause ERESOLVE

1 participant