opencode-context-indicator 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ Notable user-facing changes per release. Dates are commit days (UTC).
4
4
  The package also ships a dual V1/V2 plugin — see the README for the surface
5
5
  matrix; everything below concerns the V2 path unless stated otherwise.
6
6
 
7
+ ## 1.5.2 — 2026-10-21
8
+
9
+ Maintenance release: no runtime behavior change. It aligns the dev toolchain
10
+ with opencode 2.1.2 and stops the CI drift gate from going red on patch
11
+ releases.
12
+
13
+ - Dev: `@opencode/plugin` devDependency pinned to `2.1.2`; `@opentui/solid`
14
+ and `@opentui/core` aligned with the 2.1.2 host (`0.6.6`).
15
+ - Tests: the e2e gate now terminates reliably on Windows. `process.exit()`
16
+ could deadlock inside Node's native exit after the node-pty/conpty teardown:
17
+ the run printed its verdict and then hung forever (which would also hang
18
+ `prepublishOnly`). It now sets `exitCode`, closes the conpty sockets on a
19
+ natural child exit, and keeps an unref'd watchdog as a safety net.
20
+ - Dev: `test/drift-watch.mjs` is now advisory on patch drift (warning, exit 0),
21
+ so the daily CI no longer goes red on every opencode patch. Breaking drift
22
+ still fails: a major bump, a minor bump of `@opencode/plugin`, a minor bump
23
+ for 0.x `@opentui/*`, or a structural host change (no `workspaces.catalog`
24
+ / no `@opentui` entries). `--strict` / `DRIFT_STRICT=1` fails on ANY drift
25
+ and is the release check; exit codes are set via `process.exitCode` so piped
26
+ CI logs are never truncated. README/CI unit-check counters updated to
27
+ T1-T25c / 62.
28
+
7
29
  ## 1.5.1 — 2026-10-19
8
30
 
9
31
  - **Compaction now handled by the real `compaction` hook.** opencode dispatches
package/README.md CHANGED
@@ -499,13 +499,13 @@ the sidebar instead.
499
499
  gracefully (the breakdown falls back to throttled `session.messages` fetches
500
500
  and toasts keep working).
501
501
  * **OpenCode ≥ 2.0.16** for the V2 path (built and verified against
502
- **2.0.26**).
502
+ **2.1.2**).
503
503
  * **TUI sidebar**: terminal TUI only, requires the OpenTUI rendering stack that
504
504
  ships with OpenCode. `@opentui/core` and `solid-js` are **optional** peer
505
505
  dependencies resolved by OpenCode at runtime; the main plugin installs and runs
506
506
  fine without them (the sidebar simply is not available). `@opentui/solid` is
507
- instead shipped as a **pinned direct dependency** (exact `0.5.17`, matching
508
- the OpenTUI stack OpenCode 2.0.26 ships): OpenCode's
507
+ instead shipped as a **pinned direct dependency** (exact `0.6.6`, matching
508
+ the OpenTUI stack OpenCode 2.1.2 ships): OpenCode's
509
509
  TUI loader does not expose a host instance of it, so for npm-installed plugins
510
510
  the JSX pragma would otherwise fail to resolve `@opentui/solid/jsx-runtime`
511
511
  (upstream: opencode issue #33884 — `node_modules` plugins are excluded from the
@@ -578,10 +578,11 @@ caller.
578
578
  ### Running tests
579
579
 
580
580
  ```bash
581
- npm run test:prepublish # fast gate: tarball + tui.tsx + resolve + T1–T24 unit checks
581
+ npm run test:prepublish # fast gate: tarball + tui.tsx + resolve + T1-T25c unit checks
582
582
  npm run test:e2e # full E2E: isolated plugin load + one "Say OK" round-trip
583
583
  npm run test:e2e:quick # E2E load-only, no LLM call
584
- npm run test:drift # OpenTUI pin vs the latest RELEASED opencode (also in CI)
584
+ npm run test:drift # advisory: warns on non-breaking host drift (also in CI)
585
+ npm run test:drift:strict # release check: fails on ANY host drift
585
586
  ```
586
587
 
587
588
  `prepublishOnly` runs **both** gates automatically on `npm publish`
@@ -599,7 +600,7 @@ STEP 80 s, ~3 min total.
599
600
  | (a) tarball composition | `package.json` `files[]` expands to the base files plus every `lib/*` module (count asserted dynamically) | no test/node_modules/tsconfig in the tarball |
600
601
  | (b) pragma regression | esbuild `--jsx=automatic` → `@opentui/solid/jsx-runtime` present, `react/jsx-runtime` absent | a removed/broken pragma kills the sidebar on npm install |
601
602
  | (c) resolve chain | replica install: host-bridged + peer packages resolve; local tui.tsx relative imports resolve via node from the entry (resolve-bridge.cjs) | broken peer/optional dep or a bad local import silently breaks the sidebar |
602
- | (d) unit harness T1–T24 | limit/agent/state fix assertions plus measureContributors, redacted-export, shared category-helper, sanitizer/unicode, prompt-cache and waste-detector checks (58 total) | regressions in modelLimits, writeStateFile, hydrate, contributors, export |
603
+ | (d) unit harness T1-T25c | limit/agent/state fix assertions plus measureContributors, redacted-export, shared category-helper, sanitizer/unicode, prompt-cache and waste-detector checks (62 total) | regressions in modelLimits, writeStateFile, hydrate, contributors, export |
603
604
  | (e) corporate-identifier scan | no forbidden identifiers in the published surface + test tree | compliance |
604
605
  | (f) non-English scan | no non-ASCII letters (`\p{L}` above U+007F) in any repo file | English-only source rule |
605
606
 
@@ -644,9 +645,15 @@ repo inactivity — a push or manual run re-enables them):
644
645
  `lib/*` imports);
645
646
  2. `test/prepublish.mjs` — the full fast gate (a)–(f), including the standalone
646
647
  esbuild transpile check (pragmas, no React);
647
- 3. `test/drift-watch.mjs` — the OpenTUI pin must match the OpenTUI catalog of the
648
- **latest released** opencode; red CI means "bump the pin before the next
649
- release".
648
+ 3. `test/drift-watch.mjs` — compares the OpenTUI pins and the
649
+ `@opencode/plugin` types devDependency with the **latest released** opencode.
650
+ It is **advisory by default**: patch drift prints a `::warning::` annotation
651
+ and exits 0, so the daily pipeline does not go red on every host patch. Only
652
+ a **breaking** drift fails: a major bump, a minor bump of
653
+ `@opencode/plugin` (its TUI type surface is not guaranteed additive), a
654
+ minor bump for 0.x `@opentui/*`, or a structural host change (no
655
+ `workspaces.catalog` / no `@opentui` entries). Before a release run
656
+ `npm run test:drift:strict` to fail on any drift.
650
657
 
651
658
  The Node-pty E2E is not run in CI (requires the OpenCode binary) and is skipped
652
659
  gracefully when the CLI is absent (`[SKIP] opencode CLI not found`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-context-indicator",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Real-time context-window usage for OpenCode: per-category token breakdown, a zero-LLM /cx panel with per-session cost and a searchable family-session picker, and a TUI sidebar. Dual V1 + V2 plugin entry.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -61,11 +61,11 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@opentui/solid": "0.5.17"
64
+ "@opentui/solid": "0.6.6"
65
65
  },
66
66
  "devDependencies": {
67
- "@opencode/plugin": "2.0.32",
68
- "@opentui/core": "0.5.17",
67
+ "@opencode/plugin": "2.1.2",
68
+ "@opentui/core": "0.6.6",
69
69
  "@types/node": "26.6.3",
70
70
  "esbuild": "^0.28.2",
71
71
  "node-pty": "^1.1.0",
@@ -76,7 +76,8 @@
76
76
  "test:prepublish": "node test/prepublish.mjs",
77
77
  "test:e2e": "node test/e2e-tui.mjs --full",
78
78
  "test:e2e:quick": "node test/e2e-tui.mjs --quick",
79
- "test:drift": "node test/drift-watch.mjs"
79
+ "test:drift": "node test/drift-watch.mjs",
80
+ "test:drift:strict": "node test/drift-watch.mjs --strict"
80
81
  },
81
82
  "prepublishOnly": "node test/prepublish.mjs && node test/e2e-tui.mjs --full"
82
83
  }
package/tui.tsx CHANGED
@@ -38,7 +38,7 @@
38
38
  *
39
39
  * Runtime requirements: @opentui/core and solid-js are optional peers resolved
40
40
  * by OpenCode at runtime. @opentui/solid is a pinned direct dependency (exact
41
- * 0.5.17): OpenCode's TUI loader does not expose a host instance of it, so for
41
+ * 0.6.6): OpenCode's TUI loader does not expose a host instance of it, so for
42
42
  * npm-installed plugins the JSX pragma would otherwise fail to resolve
43
43
  * `@opentui/solid/jsx-runtime` (upstream opencode issue #33884).
44
44
  *