Skip to content

v2.1.1 — Reliable npm installation for V1 + V2

Latest

Choose a tag to compare

@SolitudeRA SolitudeRA released this 19 Oct 01:15
· 2 commits to main since this release
ecad580

Fix npm installation on OpenCode V1 and V2

2.1.1 fixes the package metadata that could prevent a clean installation of 2.1.0 with ERESOLVE. The optional peer declarations caused npm to resolve both host SDK families. The observed V1 installation selected @opencode-ai/plugin@1.19.3, then @opentui/keymap@0.6.6 and @opentui/solid@0.6.6, conflicting with the plugin's declared renderer range below 0.6.

The SDKs, OpenTUI, and Solid now remain development dependencies only; OpenCode supplies its own runtime modules. Removing runtime peer declarations lets the prebuilt package install without resolving a second host dependency tree. The three plugin bundles are byte-identical to 2.1.0, and the supported host ranges are unchanged.

Install or upgrade

OpenCode Install 2.1.1 Configuration
V1 >=1.18.31 <2 opencode plugin -g opencode-tui-context@2.1.1 tui.json → plugin
V2 >=2.0.32 <3 opencode plugin add opencode-tui-context@2.1.1 cli.json → plugins

For an existing V1 entry, append --force to preserve its options while selecting 2.1.1. For an existing V2 entry, change its package version to opencode-tui-context@2.1.1 and retain its options. Restart OpenCode after updating. No --legacy-peer-deps workaround, manual SDK installation, or local compilation is needed.

The ZIP contains the same ten-file layout: keep package.json, the root tui.js, and all three dist/ files together. Use the attached SHA256SUMS to check the archives.

English guide · 中文指南 · 日本語ガイド

Validation

Packaging now checks a normal npm installation of the generated tarball in a clean project with fresh configuration and an empty cache. It uses the public npm registry, disables scripts, audit, and funding requests, and verifies that only the plugin is installed. This supplements archive, entrypoint, unit, and native renderer checks by exercising dependency resolution that the successful local-directory host checks for 2.1.0 did not cover. Offline mode is not used because it can skip missing optional-peer metadata and conceal the original failure.

The normal clean-install regression reproduced ERESOLVE with the published 2.1.0 package and passed with 2.1.1. Type checking, 93 unit tests with 185 assertions, three entrypoint-isolation scenarios, nine V2 renderer groups, and eight V1 renderer groups passed locally and in Ubuntu and Windows CI. The release workflow also passed.

After publication, fresh Windows installations using the documented native commands fetched 2.1.1 from registry.npmjs.org on OpenCode V1 1.18.31 and V2 2.0.32. Both wrote the exact versioned configuration entry; all three installed bundles matched the published archive, and each host rendered through its own adapter. V1 passed usage, empty state, revert/unrevert, completed-compaction fixtures, resizing, and disable/re-enable across 39 captured frames. V2 passed usage, empty state, real revert/clear operations, resizing, and configuration reload across 59 captured frames. Candidate installs through a strict loopback registry had also passed before publication.

The npm tarball and GitHub tarball match byte for byte, and the ZIP contains the same ten package files. Archive checksum checks passed, and the npm provenance attestation passed independent cryptographic verification. npm's latest tag points to 2.1.1.

Host scenarios used synthetic sessions without external model calls; no live-provider conversation validation is claimed. The npm website returned Cloudflare HTTP 403 during the visual check, so its README, preview image, and link rendering remain unverified. This website limitation is separate from the successful public-registry installation and TUI checks above.