Skip to content

Built package for the installed TUI plugin ​

Status: PASS Date: 2026-11-16 Ticket: #279 Parent spec: #268 Predecessor: #270 clean-install record Branch: ticket/279-built-package

Scope ​

This record proves @heyimteee/ensemble@0.1.0-rc.2 as a built package: the server, TUI, and RPC entries are compiled JavaScript, the TUI is compiled with the Solid OpenTUI transform, the TUI runtime packages are declared dependencies, and the installed package loads through opencode plugin add into an isolated OpenCode 2.2.7 host. No public npm publish, real credential, workspace link, or repository plugin path is used. The OpenCode configuration, HOME, XDG directories, project, and mock agent are temporary and were not the user's global configuration.

Environment ​

ItemValue
HostLinux 6.12.116+deb13-amd64
Node26.12.1
npm12.2.1
OpenCode CLI2.2.7
tmux3.5a
Package@heyimteee/ensemble@0.1.0-rc.2
RC channelEphemeral 127.0.0.1 npm registry for the candidate; runtime dependencies from the public npm registry

The package version is 0.1.0-rc.2; package-lock.json records the same version. 0.1.0-rc.1 remains an unpublished candidate and is superseded by this record for the TUI criterion.

Build shape ​

npm run build runs scripts/build.mjs. It compiles the runtime closure from src/v2 into dist and emits three public entries:

ExportBuilt file
.dist/server.js
./tuidist/tui/index.js
./rpcdist/rpc.js
  • .tsx files are compiled by babel-preset-solid with moduleName: "@opentui/solid" and generate: "universal", so the installed package is Solid-compiled JavaScript rather than runtime jsx() calls.
  • .ts files are compiled by @babel/preset-typescript.
  • Relative .ts/.tsx imports are rewritten to .js for Node's resolver.
  • The build emits 121 JavaScript files: exactly the runtime closure, with tests, fixtures, docs, scripts, and the nine development-only modules excluded.
  • The installed package needs no repository tsconfig.json; all JSX handling happens before packing.

npm run check:build typechecks the runtime closure with tsconfig.build.json and runs scripts/check-build.mjs, which rejects a missing export target, raw TypeScript, a .ts import, a react reference, or a TUI entry without the Solid runtime. prepack runs the build and this check, so npm pack/npm publish cannot produce a tarball without the built entries.

Runtime dependency choice ​

The TUI runtime packages are regular, exact dependencies:

json
"dependencies": {
  "@opentui/core": "0.7.0",
  "@opentui/solid": "0.7.0",
  "solid-js": "1.9.12"
}

@opencode/plugin stays the host-supplied optional peer with the unchanged range 2.2.6 || 2.2.7; the Node floor stays >=22.23.4. The isolated install check resolves all three TUI packages from the plugin cache:

text
live: PASS installed package: dist/tui/index.js and declared TUI dependencies resolve in the plugin cache

OpenCode's runtime plugin support also rewrites the plugin's @opentui/*, solid-js, and @opencode/plugin/tui imports to its own loaded modules. The declared dependencies make the package self-sufficient in the cache without relying on that rewrite; the rewrite is why the same built artifact renders consistently with the host's OpenTUI renderer.

Commands and results ​

sh
npm run verify
npm run docs:check
OPENCODE_BIN=<opencode-2.2.7>/bin/opencode npm run test:install:rc
CheckResultEvidence
npm run verifyPASSStrict typecheck; 2,069 tests, 0 failed/skipped
npm run docs:checkPASSContract v7; OpenCode 2.2.6/2.2.7; Node >=22.23.4
npm packPASS@heyimteee/ensemble@0.1.0-rc.2; 124 files; 503,447-byte tarball; 121 built JS files
Pack contentsPASSRuntime-only dist closure; pack-content test rejects tests, fixtures, docs, scripts, TypeScript sources, and dev modules
Local registry installPASSopencode plugin add @heyimteee/ensemble@0.1.0-rc.2 recorded in the isolated config
Installed packagePASSdist/tui/index.js present; no src; TUI dependencies resolve inside the plugin cache
opencode plugin listPASSensemble.v2 0.1.0-rc.2 @heyimteee/ensemble@0.1.0-rc.2
Server plugin loadPASSPackage entrypoint dist/server.js under the isolated package cache
Server toolsPASSOne host turn reported ensembleToolCount: 6
TUI plugin loadPASSEnsemble route and /ensemble command loaded; ENSEMBLE header and empty state visible
No workspace linkPASSConfig carries only the package spec; the host opened the mock project only
No credential/publishPASSLoopback-only candidate registry; public registry used only to fetch declared runtime dependencies

opencode plugin list:

text
ID           VERSION     SOURCE
ensemble.v2  0.1.0-rc.2  @heyimteee/ensemble@0.1.0-rc.2

Server load evidence from the isolated host log:

text
msg="loading plugin" id=@heyimteee/ensemble@0.1.0-rc.2
entrypoint=file://<isolated-cache>/cache/opencode/npm/@heyimteee/ensemble@0.1.0-rc.2/<install>/node_modules/@heyimteee/ensemble/dist/server.js

Install-check pass lines:

text
live: PASS pack: @heyimteee/ensemble@0.1.0-rc.2 (503447 bytes)
live: PASS registry: loopback-only candidate package; runtime dependencies stay on the public registry
live: PASS plugin add: recorded @heyimteee/ensemble@0.1.0-rc.2 in isolated config
live: PASS installed package: dist/tui/index.js and declared TUI dependencies resolve in the plugin cache
live: PASS plugin list: ensemble.v2 0.1.0-rc.2 from @heyimteee/ensemble@0.1.0-rc.2
live: PASS server plugin: ensemble.v2 active from @heyimteee/ensemble@0.1.0-rc.2
live: PASS server tools: 6 Ensemble tools registered in a host turn
live: PASS TUI plugin: Ensemble route and /ensemble command loaded
live: install-check: PASS (@heyimteee/ensemble@0.1.0-rc.2)

Why the build changed shape ​

The 0.1.0-rc.1 source package failed in two stages, both recorded in the #270 record:

  1. The installed TSX had no repository tsconfig.json, so the host loader used the classic JSX runtime and asked for react.
  2. Adding @jsxImportSource @opentui/solid moved the error to a missing @opentui/solid; the optional peers were not in the plugin cache.

A first built attempt with TypeScript's react-jsx/@opentui/solidjsxImportSource produced runtime jsx() calls. The plugin loaded but the /ensemble page rendered blank, because OpenTUI's Solid transform explicitly skips node_modules and TypeScript does not apply the Solid compile-time transform. The shipped build therefore uses babel-preset-solid and generate: "universal", and the install check proves the actual rendered route, not only a successful module evaluation.

Skips ​

  • Public npm publish is intentionally out of scope; no registry credential was used.
  • macOS/Herdr verification remains ticket #277.
  • The #270 TUI acceptance criterion is satisfied by this record; the public release remains open until the release checklist completes.

Released under the MIT License.