v1.0.1
v1.0.1 — TokenMeter: fix the unloadable TUI package entrypoints
TokenMeter 1.0.0 published dist/tokenmeter.js with no exports map. OpenCode resolves npm TUI plugins exclusively through exports["./tui"], so the published package never loaded: the sidebar never appeared. 1.0.1 ships the contract-compliant entrypoint pair, the regression guard that makes the defect impossible to republish silently, and the plugin skill's now-mandatory entrypoint contract.
What changed
The package loads again: dist/tui.js + dist/tui.d.ts via exports["./tui"]
- The build now produces exactly
dist/tui.js— the same OpenTUI Solid-transform bundle (realeffect/insert/insertNodereactive bindings, external host runtimes) — plus a deterministicdist/tui.d.tsdeclaration emitted from the source entry by the project's own TypeScript duringbun run build(no new dependency). package.jsondeclaresmain/typesand anexportsmap:"./tui"(and".", pointing at the same pair for legacy resolvers) →dist/tui.js+dist/tui.d.ts.- The obsolete
dist/tokenmeter.jspath is gone. No compatibility alias is kept. - Runtime dependencies are unchanged:
@opentui/core,@opentui/solid, andsolid-jsremain external runtime packages provided by the TUI host and shipped independencies.
The defect cannot silently return
test/artifact.test.tsnow asserts the dist surface (exactlytui.js+tui.d.ts, nevertokenmeter.jsorindex.*), the manifestexportsshape, the declaration content, and thebun pm pack --dry-runtarball listing. A stale artifact or a missingexports["./tui"]fails CI before any publish.
The plugin skill enforces the entrypoint contract
- The
opencode-pluginskill documents the four possible artifact pairs and when each applies: TUI-only (tui.js/tui.d.ts→exports["./tui"], registered intui.json), server/runtime-only (index.js/index.d.ts→exports["."]orexports["./runtime"], registered inopencode.json), dual (both pairs, two configs), and forbids shippingindex.*in a TUI-only package.
The panel shows its new version
- The sidebar title row renders
TokenMeter 1.0.1; DESIGN.md, PRD, README, and the render/unit tests now describe the current UI.
Upgrade
From 1.0.0 (unloadable):
- Pinned users: change the pin to
1.0.1in your TUI config, then restart OpenCode. - Unpinned users: OpenCode resolves
lateston launch — restart OpenCode to pick up 1.0.1.
Both cases:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-tokenmeter-tui"]
}OpenCode installs plugin dependencies automatically — there is no npm install step.
Known issues
- The sidebar glyphs are Nerd Font PUA codepoints: without a Nerd Font active in the terminal they degrade to missing characters. Every number still renders and the panel never crashes.
- The cache breakdown row (
R<read>|W<write>) needs roughly 36 terminal columns of sidebar width; narrower sidebars omit the breakdown row rather than overflow. - Project totals include deleted sessions from the first run of 1.0.0 onward; sessions deleted before the plugin's SQLite store existed are not counted retroactively.
- The
opencode-tokenmeter-tui@1.0.0-bootstrap.0placeholder (if still present on npm under thebootstrapdist-tag) is not loadable and should never be pinned; remove thebootstrapdist-tag after this stable release perdocs/release-security.md.
Rollback
There is no functional npm version before 1.0.1: 1.0.0 was publishable but unloadable, and the 1.0.0-bootstrap.0 placeholder is not a usable plugin. If 1.0.1 regresses:
- Users: unpin or revert to the last working version you actually ran locally, or remove the plugin entry until a fix ships; report the failure so a 1.0.2 can be cut.
- Maintainer: the release pipeline is tag-driven (
v1.0.1→ preflight → publish → verify). A regression in 1.0.1 is corrected by cutting 1.0.2, not by re-pointing 1.0.1 — npm versions are immutable. Keep this document as the single release record until the next tag renames it.