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
| Item | Value |
|---|---|
| Host | Linux 6.12.116+deb13-amd64 |
| Node | 26.12.1 |
| npm | 12.2.1 |
| OpenCode CLI | 2.2.7 |
| tmux | 3.5a |
| Package | @heyimteee/ensemble@0.1.0-rc.2 |
| RC channel | Ephemeral 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:
| Export | Built file |
|---|---|
. | dist/server.js |
./tui | dist/tui/index.js |
./rpc | dist/rpc.js |
.tsxfiles are compiled bybabel-preset-solidwithmoduleName: "@opentui/solid"andgenerate: "universal", so the installed package is Solid-compiled JavaScript rather than runtimejsx()calls..tsfiles are compiled by@babel/preset-typescript.- Relative
.ts/.tsximports are rewritten to.jsfor 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:
"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:
live: PASS installed package: dist/tui/index.js and declared TUI dependencies resolve in the plugin cacheOpenCode'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
npm run verify
npm run docs:check
OPENCODE_BIN=<opencode-2.2.7>/bin/opencode npm run test:install:rc| Check | Result | Evidence |
|---|---|---|
npm run verify | PASS | Strict typecheck; 2,069 tests, 0 failed/skipped |
npm run docs:check | PASS | Contract v7; OpenCode 2.2.6/2.2.7; Node >=22.23.4 |
npm pack | PASS | @heyimteee/ensemble@0.1.0-rc.2; 124 files; 503,447-byte tarball; 121 built JS files |
| Pack contents | PASS | Runtime-only dist closure; pack-content test rejects tests, fixtures, docs, scripts, TypeScript sources, and dev modules |
| Local registry install | PASS | opencode plugin add @heyimteee/ensemble@0.1.0-rc.2 recorded in the isolated config |
| Installed package | PASS | dist/tui/index.js present; no src; TUI dependencies resolve inside the plugin cache |
opencode plugin list | PASS | ensemble.v2 0.1.0-rc.2 @heyimteee/ensemble@0.1.0-rc.2 |
| Server plugin load | PASS | Package entrypoint dist/server.js under the isolated package cache |
| Server tools | PASS | One host turn reported ensembleToolCount: 6 |
| TUI plugin load | PASS | Ensemble route and /ensemble command loaded; ENSEMBLE header and empty state visible |
| No workspace link | PASS | Config carries only the package spec; the host opened the mock project only |
| No credential/publish | PASS | Loopback-only candidate registry; public registry used only to fetch declared runtime dependencies |
opencode plugin list:
ID VERSION SOURCE
ensemble.v2 0.1.0-rc.2 @heyimteee/ensemble@0.1.0-rc.2Server load evidence from the isolated host log:
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.jsInstall-check pass lines:
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:
- The installed TSX had no repository
tsconfig.json, so the host loader used the classic JSX runtime and asked forreact. - Adding
@jsxImportSource @opentui/solidmoved 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.