oc-flight-deck 0.25.2 → 0.25.4

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
@@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.25.2] - 2026-11-26
11
-
12
10
 
13
11
  - npm metadata alignment: README wording and keywords refreshed (cosmetic).
14
12
  ### Fixed
@@ -24,6 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
22
 
25
23
  - Every numeric sidebar row now draws an honest zero instead of hiding or drawing a placeholder. The `tps` row sticks at `0 <label>` when nothing generates; observed TTFT rides only while a rate stands. The default `sidebar.placeholder` is now `0` for the text rows that still need one.
26
24
 
25
+ ## [0.25.4] - 2026-11-30
26
+
27
+ ### Changed
28
+
29
+ - Documentation only: the README now leads with the official `opencode plugin add` command, keeps the config-array route as an alternative, and states the Windows and macOS/Linux config paths once each. No runtime behaviour changed.
30
+
27
31
  ## [0.24.0] - 2026-11-17
28
32
 
29
33
  ### Added
package/README.md CHANGED
@@ -14,13 +14,25 @@
14
14
 
15
15
  ## Install
16
16
 
17
- Add the entry to the `plugins` array in your `opencode.jsonc`, then restart OpenCode:
17
+ Install with the official OpenCode command, then restart OpenCode:
18
+
19
+ ```sh
20
+ opencode plugin add oc-flight-deck
21
+ ```
22
+
23
+ Or add the plugin to your config yourself:
18
24
 
19
25
  ```json
20
26
  { "plugins": ["oc-flight-deck"] }
21
27
  ```
22
28
 
23
- ## Use it
29
+ Config file: `%USERPROFILE%\.config\opencode\opencode.jsonc` on Windows or `~/.config/opencode/opencode.jsonc` on macOS/Linux.
30
+
31
+ Inside config values OpenCode also substitutes `{env:USERPROFILE}` (Windows) and `{env:HOME}` (macOS/Linux) — config-string syntax, not shell syntax.
32
+
33
+ ## First use
34
+
35
+ Open a session and check that the telemetry panel appears beside it.
24
36
 
25
37
  The rail draws up to 22 named fields in the order you choose; `MAX_LINES` (24) caps fixed lines plus live rows together. Among the fields:
26
38
 
package/dist/tui/index.js CHANGED
@@ -4708,6 +4708,7 @@ function createTpsReader(context, live, scope = DEFAULT_TPS_SCOPE, realtime) {
4708
4708
 
4709
4709
  // src/tui/index.tsx
4710
4710
  import { jsx, jsxs } from "@opentui/solid/jsx-runtime";
4711
+ var observe = (..._reads) => {};
4711
4712
  var tui_default = Plugin.define({
4712
4713
  id: "oc-flight-deck",
4713
4714
  setup(context) {
@@ -4923,9 +4924,7 @@ var tui_default = Plugin.define({
4923
4924
  render: ({ sessionID }) => {
4924
4925
  watchedSession = sessionID;
4925
4926
  bridge?.follow(sessionID);
4926
- ticker?.frame;
4927
- bridge?.status;
4928
- goBridge?.usage;
4927
+ observe(ticker?.frame, bridge?.status, goBridge?.usage);
4929
4928
  const source = snapshot(sessionID);
4930
4929
  const lines = railLines(config, source);
4931
4930
  if (lines.length === 0)
@@ -4941,10 +4940,10 @@ var tui_default = Plugin.define({
4941
4940
  releases.push(context.ui.slot({
4942
4941
  prepend: "sidebar.footer",
4943
4942
  render: () => {
4944
- ticker?.frame;
4943
+ const frame = ticker?.frame;
4945
4944
  const goUsage = goBridge?.usage;
4946
4945
  const goReason = goBridge === undefined ? "no-bridge" : goBridge.reason ?? (goUsage === undefined ? "pending" : undefined);
4947
- const panel = goPanelEnabled ? goPanelLines(goUsage, Date.now(), goLook.current(), ticker?.frame ?? 0, goReason) : [];
4946
+ const panel = goPanelEnabled ? goPanelLines(goUsage, Date.now(), goLook.current(), frame ?? 0, goReason) : [];
4948
4947
  return /* @__PURE__ */ jsxs("box", {
4949
4948
  flexDirection: "column",
4950
4949
  children: [
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "oc-flight-deck",
3
- "version": "0.25.2",
3
+ "version": "0.25.4",
4
4
  "description": "Live cost, token, cache and context telemetry for every OpenCode session in your sidebar.",
5
5
  "keywords": [
6
6
  "opencode",
7
7
  "opencode-plugin",
8
- "plugin",
8
+ "opencode-plugin-local",
9
+ "ai-agent",
10
+ "ai-coding-agent",
9
11
  "tui",
10
12
  "telemetry",
11
- "cost",
12
- "tokens",
13
- "typescript",
14
- "tooling",
15
- "session"
13
+ "sidebar",
14
+ "cost"
16
15
  ],
17
16
  "license": "MIT",
18
17
  "author": "nathwn12",
@@ -62,13 +61,13 @@
62
61
  "access": "public"
63
62
  },
64
63
  "dependencies": {
65
- "@opencode/plugin": "^2.3.0"
64
+ "@opencode/plugin": "^2.3.2"
66
65
  },
67
66
  "devDependencies": {
68
- "@opencode/plugin": "2.3.0",
69
- "@opentui/core": "^0.9.0",
70
- "@opentui/solid": "^0.9.0",
71
- "@types/bun": "^1.4.4",
67
+ "@opencode/plugin": "2.3.2",
68
+ "@opentui/core": "^0.9.7",
69
+ "@opentui/solid": "^0.9.7",
70
+ "@types/bun": "^1.4.5",
72
71
  "solid-js": "1.9.19",
73
72
  "string-width": "7.2.0",
74
73
  "typescript": "^7.0.2"
package/src/tui/index.tsx CHANGED
@@ -28,6 +28,9 @@ import { createRealtimeTps } from "./realtime-tps.js";
28
28
  import { createSessionReads, locationOf } from "./session-reads.js";
29
29
  import { createTpsReader } from "./session-tps.js";
30
30
 
31
+ /** Reading a host-store getter inside a render subscribes that render to it. */
32
+ const observe = (..._reads: unknown[]): void => {};
33
+
31
34
  // Flight Deck is a read-only instrument panel for the OpenCode V2 CLI/TUI. It
32
35
  // shows the open session's agent, model, branch, cost, tokens, and cache hit
33
36
  // rate in the sidebar. It uses only the official CLI plugin boundary —
@@ -453,9 +456,7 @@ export default Plugin.define({
453
456
  // immediately on change, and the status read below subscribes this
454
457
  // render to the bridge's host store, so polls re-run the rail.
455
458
  bridge?.follow(sessionID);
456
- void ticker?.frame;
457
- void bridge?.status;
458
- void goBridge?.usage;
459
+ observe(ticker?.frame, bridge?.status, goBridge?.usage);
459
460
 
460
461
  const source = snapshot(sessionID);
461
462
  const lines = railLines(config, source);
@@ -497,7 +498,7 @@ export default Plugin.define({
497
498
  // clock-derived, and the read is what registers the dependency so
498
499
  // a poll re-runs this slot. `goBridge` is absent when neither
499
500
  // surface asked for it, so both reads are safe to skip.
500
- void ticker?.frame;
501
+ const frame = ticker?.frame;
501
502
  const goUsage = goBridge?.usage;
502
503
  // A blank panel must name its cause. `goBridge` absent means
503
504
  // `startGoBridge` found no usable host store - distinct from a
@@ -509,7 +510,7 @@ export default Plugin.define({
509
510
  ? "no-bridge"
510
511
  : (goBridge.reason ?? (goUsage === undefined ? "pending" : undefined));
511
512
  const panel = goPanelEnabled
512
- ? goPanelLines(goUsage, Date.now(), goLook.current(), ticker?.frame ?? 0, goReason)
513
+ ? goPanelLines(goUsage, Date.now(), goLook.current(), frame ?? 0, goReason)
513
514
  : [];
514
515
  return (
515
516
  <box flexDirection="column">