Repository navigation
Releases
v2.1.1 — Reliable npm installation for V1 + V2
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.
v2.1.0 — OpenCode V1 + V2
Installation advisory: A clean native npm installation of
2.1.0failed dependency resolution before the TUI launched. The fix is available in v2.1.1; use that patch for installation. This does not invalidate the local-directory rendering checks recorded below, but those checks did not establish npm installation.
OpenCode V1 and V2 in one package
opencode-tui-context@2.1.0 adds the OpenCode V2 plugin API while retaining V1 support. Both hosts use the same package version, panel, and display options; the plugin loads the adapter for the host that is running it.
Installation issue
Post-publication verification with OpenCode V1 1.18.31 failed with unable to resolve dependency tree (ERESOLVE). The package's optional peers caused npm to resolve both host SDK families. The selected @opencode-ai/plugin@1.19.3 dependency tree included @opentui/keymap@0.6.6 and @opentui/solid@0.6.6, conflicting with this plugin's @opentui/solid >=0.4.5 <0.6 declaration. The TUI did not launch during that native registry-install attempt, and no model calls were made.
Use v2.1.1 for the corrected package metadata. The original 2.1.0 tag and assets remain unchanged. Its local ZIP layout is package.json, the root tui.js, and all three files in dist/; the existing local-package acceptance below is separate from npm dependency resolution.
Archived English guide · 原版中文指南 · 当時の日本語ガイド
Changes
- Native V2
Plugin.define()integration, alongside the V1 module contract. Lazy loading keeps each host's SDK and renderer isolated from the other adapter. - Shared context-window and token-composition bars, responsive legends, theme colors, and configuration across both hosts.
- Usage follows the latest assistant snapshot with positive output tokens in the active context. Reverted messages and usage before completed compaction are excluded; model limits come from the measured message's model.
- Reactive V2 updates and V1 event-driven refresh with disposal cleanup. The plugin reads existing usage without polling, tokenizing text, or making model calls.
- Matching ten-file npm and ZIP packages, plus updated English, Chinese, and Japanese installation and configuration guides.
Validation scope
Checks passed locally and in Ubuntu and Windows CI: type checking, 93 unit tests with 185 assertions, three entrypoint-isolation scenarios, nine V2 renderer groups using OpenTUI 0.5.17 / Solid 1.9.15, and eight V1 renderer groups using OpenTUI 0.4.5 / Solid 1.9.12.
The same unpacked release candidate was loaded in isolated Windows configurations with real OpenCode V1 1.18.31 and V2 2.0.32. V1 checked usage, empty state, revert/unrevert, a completed-compaction fixture, sidebar resizing, and plugin disable/re-enable across 40 captured frames. V2 checked usage, empty state, real revert/clear operations, sidebar resizing, and configuration-driven disable/re-enable across 58 captured frames. Archive contents and checksums were validated.
Host checks used synthetic sessions and made no external model calls. These results cover the named hosts and fixtures, not every version in the declared compatibility range or live-provider conversations. The post-publication npm installation failed as described above. The npm website returned Cloudflare HTTP 403, so its README, preview image, and link rendering could not be visually verified.
v1.0.1
First prebuilt npm release for OpenCode V1
This historical release uses the OpenCode V1 plugin API. Its installation baseline was OpenCode 1.18.31; it does not support the V2 plugin API, despite the original manifest's unbounded >=1.18.0 host range.
Install this version
opencode plugin -g opencode-tui-context@1.0.1The explicit version preserves this historical release. To replace an existing package entry with 1.0.1 while keeping tuple options, append --force. Restart OpenCode and open the sidebar. No source checkout, Bun installation, or compilation is required.
For manual installation, download opencode-tui-context-1.0.1.zip and extract the included directory. Keep package.json and dist/tui.js together. Add the directory to the plugin array in tui.json, using an absolute path or a path relative to that configuration file. For example, after placing it in local-plugins/ beside tui.json:
{
"plugin": ["./local-plugins/opencode-tui-context"]
}English guide · 中文指南 · 日本語ガイド
Changes
- First npm distribution with a prebuilt TUI entrypoint and no runtime dependencies.
- Matching npm and manual-install ZIP contents, with
SHA256SUMSfor both attached archives. - Ubuntu and Windows CI, checked packaging, and a version-tag release workflow.
- Multilingual installation, configuration, troubleshooting, and maintainer documentation.
Validation recorded at release
The source passed type checking, all 72 tests, and archive validation on Ubuntu and Windows. On Windows with OpenCode 1.18.31, both the then-current unversioned npm command and an explicit @1.0.1 installation succeeded with fresh isolated configuration and caches. OpenCode wrote the correct tui.json entry, loaded the package from npm, and reported it enabled and active. The installed bundle matched the CI archive, custom options were read correctly, and both runs exited without WARN/ERROR log entries.
No model calls were made. This established installation and activation, not live-conversation rendering. The initial npm publication used the exact verified main-branch CI archive and did not carry GitHub Actions OIDC provenance.
The registry served the Chinese README and correct installation metadata. GitHub documentation and the preview SVG were reachable. The npm website's visual rendering was not verified because its Cloudflare challenge blocked automated access. These are the original release's validation limits; updating this description does not change the package or assets.
v1.0.0
Initial sidebar release for OpenCode V1
This historical release uses the OpenCode V1 plugin API and provides a standalone tui.js asset. For an easier prebuilt npm or ZIP installation on V1, use v1.0.1 with the explicit package version opencode-tui-context@1.0.1. Neither of these historical releases supports the OpenCode V2 plugin API.
Install the exact v1.0.0 asset
- Download the attached
tui.jsand save it asdist/tui.jsinside youropencode-tui-contextdirectory. - Save package.json from the v1.0.0 tag alongside
dist/. Its./tuiexport points to./dist/tui.js; placing the asset beside the manifest would not match that export. - Place the complete directory in
local-plugins/beside your V1tui.jsonand add the configuration below, preserving other entries. Restart OpenCode and show the sidebar.
local-plugins/opencode-tui-context/
├── package.json
└── dist/
└── tui.js
{
"plugin": ["./local-plugins/opencode-tui-context"]
}An absolute directory path also works. Do not use ~/... inside the JSON entry: the V1 loader does not expand it. To build this exact source instead, check out tag v1.0.0 and follow its tagged README.
Highlights
- Context-window overview (
used,reserved,free) and token composition (cached,prompt,think,out), each with its own legend. - Four session-event subscriptions with a 50 ms leading-edge repaint throttle and disposal cleanup.
- Narrow-width behavior that keeps bars inside the border and displays legend counts completely or hides them.
Verification recorded at release
bun test: 72 passed, 0 failed, 136 assertions across four files.- Wide render output at container widths of at least 39 columns was byte-identical to the previously verified build.
- Attached
tui.js: 14,151 bytes; SHA-256f6a48f17f588f33e3b1f6a1333d564d651a80be6222b4382f622dc43613787d2.
These are the original automated and artifact checks. They do not establish npm installation or real-provider conversation rendering. The corrected installation layout above does not alter the tag or attached asset.