oc-flight-deck 0.25.1 → 0.25.3
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 +3 -1
- package/README.md +15 -16
- package/assets/signature-glyph.svg +5 -0
- package/dist/tui/index.js +4 -5
- package/docs/GUIDE.md +1 -1
- package/package.json +13 -11
- package/src/tui/index.tsx +6 -5
- package/assets/signature.svg +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [0.25.
|
|
10
|
+
## [0.25.3] - 2026-11-28
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
- npm metadata alignment: README wording and keywords refreshed (cosmetic).
|
|
12
14
|
### Fixed
|
|
13
15
|
|
|
14
16
|
- The `caution` row no longer reports `no progress` for an idle session: silent-turn now needs an open turn, not just a stale host `running` flag. The `status` row reads idle on stale running, paused when a permission or a question tool waits, and running only with real evidence.
|
package/README.md
CHANGED
|
@@ -4,20 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
<h1 align="center">oc-flight-deck</h1>
|
|
6
6
|
|
|
7
|
-
<p align="center"><strong>Live cost, token, cache and context telemetry for every OpenCode session
|
|
7
|
+
<p align="center"><strong>Live cost, token, cache and context telemetry for every OpenCode session in your sidebar.</strong></p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="https://www.npmjs.com/package/oc-flight-deck"><img src="https://img.shields.io/npm/v/oc-flight-deck" alt="npm version"
|
|
11
|
-
<img src="https://img.shields.io/badge/platform-windows--linux-2b3137" alt="
|
|
12
|
-
<a href="https://github.com/nathwn12/oc-collections/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT"
|
|
10
|
+
<a href="https://www.npmjs.com/package/oc-flight-deck"><img src="https://img.shields.io/npm/v/oc-flight-deck" alt="npm version" /></a>
|
|
11
|
+
<img src="https://img.shields.io/badge/platform-windows--linux-2b3137" alt="Windows and Linux" />
|
|
12
|
+
<a href="https://github.com/nathwn12/oc-collections/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT licence" /></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
|
-
## Why
|
|
16
|
-
|
|
17
|
-
Cost and context are easy to lose sight of during a long session. `oc-flight-deck` draws them beside the session, live, so you see the roll-up without leaving the run. A cache hit rate excludes writes from its denominator, because a write is not a lookup. Elapsed time is recomputed from the turn spans the host recorded, so it survives a restart and never steps backwards. Estimates carry a `~` and say so out loud.
|
|
18
|
-
|
|
19
|
-
Every setting lives in one global file, not per project.
|
|
20
|
-
|
|
21
15
|
## Install
|
|
22
16
|
|
|
23
17
|
Add the entry to the `plugins` array in your `opencode.jsonc`, then restart OpenCode:
|
|
@@ -26,9 +20,11 @@ Add the entry to the `plugins` array in your `opencode.jsonc`, then restart Open
|
|
|
26
20
|
{ "plugins": ["oc-flight-deck"] }
|
|
27
21
|
```
|
|
28
22
|
|
|
29
|
-
##
|
|
23
|
+
## First use
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
Open a session and check that the telemetry panel appears beside it.
|
|
26
|
+
|
|
27
|
+
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:
|
|
32
28
|
|
|
33
29
|
- **Honest zeros** — every numeric row draws a real zero when there is no data, never a dash or a blank.
|
|
34
30
|
- **Money** — the current model's spend for this session, and a durable lifetime total for the subagent tree. The old `cost` and `total` row names still work as aliases.
|
|
@@ -38,10 +34,11 @@ The rail draws up to 18 named rows in the order you choose. Among them are:
|
|
|
38
34
|
- **Caution annunciator** — an opt-in watchdog that stays silent until a tool or a turn stops moving, and reports what it saw without killing anything.
|
|
39
35
|
- **Quota and session rows** — the Go usage dials, and a session id row that copies the full id on click.
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
A cache hit rate excludes writes from its denominator, because a write is not a lookup. Elapsed time is recomputed from the turn spans the host recorded, so it survives a restart and never steps backwards. Estimates carry a `~` and say so out loud.
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
### Configure it
|
|
44
40
|
|
|
41
|
+
All settings live in one global file; there are no per-project files. Start from the [example config](https://github.com/nathwn12/oc-collections/blob/main/packages/oc-flight-deck/flight-deck.example.jsonc) and check the [schema](https://github.com/nathwn12/oc-collections/blob/main/packages/oc-flight-deck/flight-deck.schema.json) for each key and its default.
|
|
45
42
|
|
|
46
43
|
## Requirements
|
|
47
44
|
|
|
@@ -49,11 +46,13 @@ All settings live in one global file; there are no per-project files. Start from
|
|
|
49
46
|
- Node 22 or newer, or Bun 1.4 or newer.
|
|
50
47
|
- Any platform the host runs on.
|
|
51
48
|
|
|
49
|
+
## Status
|
|
50
|
+
|
|
51
|
+
**Unverified** — as-is, use at your own risk.
|
|
52
|
+
|
|
52
53
|
## Links
|
|
53
54
|
|
|
54
55
|
- [Issues](https://github.com/nathwn12/oc-collections/issues)
|
|
55
56
|
- [Releases](https://github.com/nathwn12/oc-collections/releases)
|
|
56
57
|
- [Guide](https://github.com/nathwn12/oc-collections/blob/main/packages/oc-flight-deck/docs/GUIDE.md)
|
|
57
58
|
- [MIT licence](https://github.com/nathwn12/oc-collections/blob/main/LICENSE)
|
|
58
|
-
|
|
59
|
-
<p align="center"><sub>Built by nathwn12</sub></p>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="120 148 300 252">
|
|
2
|
+
<!-- Glyph variant: strokes identical to the canonical signature.svg; ground tile removed, viewBox tightened to the glyph. Fits any background. -->
|
|
3
|
+
<path d="M136 384 L136 264 C136 196 180 164 234 164 C288 164 328 198 328 264 L328 384 L264 384 L264 270 C264 242 250 230 234 230 C218 230 200 242 200 270 L200 384 Z" fill="#EEF3F6"/>
|
|
4
|
+
<rect x="352" y="312" width="52" height="72" rx="8" fill="#4DD4E8"/>
|
|
5
|
+
</svg>
|
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(),
|
|
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/docs/GUIDE.md
CHANGED
|
@@ -294,7 +294,7 @@ The shipped `flight-deck.example.jsonc` is a complete starting file, and `flight
|
|
|
294
294
|
|
|
295
295
|
<!-- nathwn12 house footer: identical in every repo. Do not edit. -->
|
|
296
296
|
<p align="center">
|
|
297
|
-
<a href="https://github.com/nathwn12"><img src="../assets/signature.svg" width="96" alt="nathwn12" /></a>
|
|
297
|
+
<a href="https://github.com/nathwn12"><img src="../assets/signature-glyph.svg" width="96" alt="nathwn12" /></a>
|
|
298
298
|
</p>
|
|
299
299
|
<p align="center">
|
|
300
300
|
<sub>Built by <a href="https://github.com/nathwn12">nathwn12</a> · <a href="https://github.com/nathwn12?tab=repositories">All projects</a></sub>
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oc-flight-deck",
|
|
3
|
-
"version": "0.25.
|
|
4
|
-
"description": "Live
|
|
3
|
+
"version": "0.25.3",
|
|
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
|
-
"
|
|
8
|
+
"plugin",
|
|
9
9
|
"tui",
|
|
10
|
-
"cli",
|
|
11
|
-
"sidebar",
|
|
12
10
|
"telemetry",
|
|
13
|
-
"cost"
|
|
11
|
+
"cost",
|
|
12
|
+
"tokens",
|
|
13
|
+
"typescript",
|
|
14
|
+
"tooling",
|
|
15
|
+
"session"
|
|
14
16
|
],
|
|
15
17
|
"license": "MIT",
|
|
16
18
|
"author": "nathwn12",
|
|
@@ -60,13 +62,13 @@
|
|
|
60
62
|
"access": "public"
|
|
61
63
|
},
|
|
62
64
|
"dependencies": {
|
|
63
|
-
"@opencode/plugin": "^2.3.
|
|
65
|
+
"@opencode/plugin": "^2.3.2"
|
|
64
66
|
},
|
|
65
67
|
"devDependencies": {
|
|
66
|
-
"@opencode/plugin": "2.3.
|
|
67
|
-
"@opentui/core": "^0.9.
|
|
68
|
-
"@opentui/solid": "^0.9.
|
|
69
|
-
"@types/bun": "^1.4.
|
|
68
|
+
"@opencode/plugin": "2.3.2",
|
|
69
|
+
"@opentui/core": "^0.9.7",
|
|
70
|
+
"@opentui/solid": "^0.9.7",
|
|
71
|
+
"@types/bun": "^1.4.5",
|
|
70
72
|
"solid-js": "1.9.19",
|
|
71
73
|
"string-width": "7.2.0",
|
|
72
74
|
"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
|
-
|
|
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
|
-
|
|
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(),
|
|
513
|
+
? goPanelLines(goUsage, Date.now(), goLook.current(), frame ?? 0, goReason)
|
|
513
514
|
: [];
|
|
514
515
|
return (
|
|
515
516
|
<box flexDirection="column">
|
package/assets/signature.svg
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
-
<style>html,body{margin:0;padding:0}svg{display:block;width:100vw;height:100vh}</style>
|
|
3
|
-
<!-- Direction A: "cursor-n" — rounded lowercase n + terminal block cursor, near-black ground -->
|
|
4
|
-
<rect x="16" y="16" width="480" height="480" rx="112" fill="#0B0F14"/>
|
|
5
|
-
<path d="M136 384 L136 264 C136 196 180 164 234 164 C288 164 328 198 328 264 L328 384 L264 384 L264 270 C264 242 250 230 234 230 C218 230 200 242 200 270 L200 384 Z" fill="#EEF3F6"/>
|
|
6
|
-
<rect x="352" y="312" width="52" height="72" rx="8" fill="#4DD4E8"/>
|
|
7
|
-
</svg>
|