oc-flight-deck 0.1.1 → 0.2.0
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/README.md +84 -17
- package/flight-deck.example.jsonc +173 -95
- package/flight-deck.schema.json +178 -0
- package/package.json +2 -1
- package/src/tui/caution.ts +411 -0
- package/src/tui/config.ts +304 -8
- package/src/tui/index.tsx +185 -15
- package/src/tui/presentation.ts +1 -1
- package/src/tui/stats.ts +129 -21
- package/src/tui/ticker.ts +130 -0
package/README.md
CHANGED
|
@@ -42,27 +42,64 @@ learn. The panel appears beside an open session and starts reading.
|
|
|
42
42
|
|
|
43
43
|
| Row | Why it's there |
|
|
44
44
|
| --- | --- |
|
|
45
|
+
| `caution` | **The annunciator.** Silent unless something stopped moving. |
|
|
45
46
|
| `status` | A spinner while it works, a circle while it's waiting on you. |
|
|
46
47
|
| `agent` | Which agent you're actually talking to. |
|
|
47
|
-
| `model` | The model *and its variant*
|
|
48
|
+
| `model` | The model *and its variant* - `high` behaves differently. |
|
|
48
49
|
| `branch` | Which branch you're about to commit to. |
|
|
49
|
-
| `cost` | This
|
|
50
|
-
| `total` | **This session plus every subagent it spawned.** |
|
|
50
|
+
| `cost` | This conversation, plus its subagents once any have run. |
|
|
51
51
|
| `project` | Every session in this repo. |
|
|
52
52
|
| `tokens` | Input and output, cumulative. |
|
|
53
53
|
| `cache` | Hit rate first, because that's the number that explains the bill. |
|
|
54
54
|
| `context` | A gauge of how full the window is. |
|
|
55
|
-
| `perms` |
|
|
55
|
+
| `perms` | What is waiting for approval, not just how many. |
|
|
56
56
|
| `elapsed` | How long you've been at it. |
|
|
57
57
|
| `tps` | Output tokens per second, measured from the last completed turn. |
|
|
58
|
-
| `spark` | Recent turn sizes as a shape
|
|
58
|
+
| `spark` | Recent turn sizes as a shape. Available, off by default. |
|
|
59
|
+
| `total` | Available if you want the session/subagent split on two rows. |
|
|
59
60
|
|
|
60
|
-
### `
|
|
61
|
+
### `caution` is the one row that isn't session state
|
|
62
|
+
|
|
63
|
+
Everything else here reacts to events. **A hang emits none** - no completion, no
|
|
64
|
+
error, nothing - so every observable thing about a hang is the *absence* of a
|
|
65
|
+
signal. Catching it needs a clock instead of a listener.
|
|
66
|
+
|
|
67
|
+
It stays completely silent unless something has stopped moving, so it costs
|
|
68
|
+
nothing on a healthy session. When it does speak it reports what it saw, never
|
|
69
|
+
what it means: `shell running 8m41s`, not "stuck". A ten-minute build is not a
|
|
70
|
+
hang.
|
|
71
|
+
|
|
72
|
+
| It fires when | Threshold |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| a tool has a start time and no completion | watch at 3m, caution at 7m |
|
|
75
|
+
| a shell is still running after its tool call returned | watch at 3m, caution at 7m |
|
|
76
|
+
| the same call repeats with identical input | caution at 3 |
|
|
77
|
+
| the same call fails with identical input | caution at 3 |
|
|
78
|
+
| a running session stops producing anything | watch at 10m, caution at 20m |
|
|
79
|
+
|
|
80
|
+
The thresholds are calibrated, not guessed. Measured over **53,672 real tool
|
|
81
|
+
calls**, the exempt list (`subagent`, `task`, `delegate*`, `question`) is the
|
|
82
|
+
difference between **0.16%** and **0.57%** of calls lighting the row: `subagent`
|
|
83
|
+
alone exceeded the threshold 152 times, with a p99 of 14.7 minutes. Without the
|
|
84
|
+
list it would light up on every delegated task, and you would learn to ignore it.
|
|
85
|
+
|
|
86
|
+
The toast is **off by default**. The rail is the signal; a notification is an
|
|
87
|
+
interruption.
|
|
88
|
+
|
|
89
|
+
### `cost` now carries the subagents
|
|
61
90
|
|
|
62
91
|
Subagents run as **separate sessions**, and a session's own cost does not include
|
|
63
92
|
them. On the session this was built against, the parent reported `$0.2246` while
|
|
64
|
-
the true spend was `$0.2447`
|
|
65
|
-
|
|
93
|
+
the true spend was `$0.2447` - **9% low on money, and 54% low on input tokens**.
|
|
94
|
+
|
|
95
|
+
Rather than spend two rows on a number and its own superset, `cost` shows the
|
|
96
|
+
family total and the delta that produced it:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
cost $0.245 · +$0.020 · 2 subagents
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`total` is still available if you prefer the two figures on separate rows.
|
|
66
103
|
|
|
67
104
|
### `cache` is the row that surprises people
|
|
68
105
|
|
|
@@ -80,19 +117,34 @@ then edit. Comments and trailing commas are fine.
|
|
|
80
117
|
|
|
81
118
|
```jsonc
|
|
82
119
|
{
|
|
83
|
-
//
|
|
84
|
-
|
|
120
|
+
// Tick rate in ms. The spinner has ten frames, so 100 turns it once a
|
|
121
|
+
// second. 0 turns the timer off entirely.
|
|
122
|
+
"refresh": 100,
|
|
85
123
|
|
|
86
124
|
"sidebar": {
|
|
87
125
|
"enabled": true,
|
|
88
126
|
"lines": ["✈ FLIGHT DECK", "─────────────────"],
|
|
89
127
|
// Any rows, any order. Delete whatever you don't want.
|
|
90
128
|
"rows": [
|
|
91
|
-
"status", "agent", "model", "branch", "cost", "
|
|
92
|
-
"tokens", "cache", "context", "perms", "elapsed", "tps"
|
|
129
|
+
"caution", "status", "agent", "model", "branch", "cost", "project",
|
|
130
|
+
"tokens", "cache", "context", "perms", "elapsed", "tps"
|
|
93
131
|
]
|
|
94
132
|
},
|
|
95
133
|
|
|
134
|
+
"caution": {
|
|
135
|
+
// The annunciator. Silent unless something stopped moving.
|
|
136
|
+
"enabled": true,
|
|
137
|
+
"toolWatchSeconds": 180,
|
|
138
|
+
"toolCautionSeconds": 420,
|
|
139
|
+
"turnWatchSeconds": 600,
|
|
140
|
+
"turnCautionSeconds": 1200,
|
|
141
|
+
"repeatThreshold": 3,
|
|
142
|
+
// Tools that are slow by nature, so slow is not an anomaly for them.
|
|
143
|
+
"exemptTools": ["question", "task", "subagent", "agent", "delegate"],
|
|
144
|
+
// Off by default: the rail is the signal, a toast is an interruption.
|
|
145
|
+
"toast": false
|
|
146
|
+
},
|
|
147
|
+
|
|
96
148
|
"footer": {
|
|
97
149
|
// Off by default — the sidebar already carries the data.
|
|
98
150
|
"enabled": false,
|
|
@@ -105,16 +157,18 @@ The example file documents every row and every option inline. A typo is never
|
|
|
105
157
|
fatal: the bad value is ignored, the default comes back, and you get a one-time
|
|
106
158
|
toast naming the key to fix.
|
|
107
159
|
|
|
108
|
-
## It reads. It
|
|
160
|
+
## It reads. It writes one number.
|
|
109
161
|
|
|
110
162
|
Flight Deck shows what OpenCode already knows.
|
|
111
163
|
|
|
112
164
|
- **No network calls.** Nothing is fetched, nothing is sent.
|
|
113
165
|
- **No telemetry.** Nothing is collected or phoned home.
|
|
114
|
-
- **
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
166
|
+
- **Nothing on disk.** The one thing it writes is an animation counter in the
|
|
167
|
+
host's in-memory plugin state, so the spinner and `elapsed` keep moving
|
|
168
|
+
between turns. It is scoped to this plugin and dies with the TUI; it is never
|
|
169
|
+
persisted, and `"refresh": 0` removes even that.
|
|
170
|
+
- **No polling of your session** — cost, tokens, and permissions update from the
|
|
171
|
+
host's own events.
|
|
118
172
|
- **Theme-native.** Every line uses your active theme's text tokens, so it blends
|
|
119
173
|
with whatever look you already run.
|
|
120
174
|
|
|
@@ -137,6 +191,19 @@ tests that mount the panel in a real renderer and assert the exact characters
|
|
|
137
191
|
that come out. A guard test parses the shipped example config and asserts it
|
|
138
192
|
still matches the real defaults, so the documentation can't drift from the code.
|
|
139
193
|
|
|
194
|
+
To load the plugin **from this checkout** while working on it, add it to the
|
|
195
|
+
config of the directory you run OpenCode in:
|
|
196
|
+
|
|
197
|
+
```jsonc
|
|
198
|
+
{
|
|
199
|
+
"plugins": ["."]
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
That file is deliberately **not** committed. If the plugin is also installed
|
|
204
|
+
globally, declaring it in both places registers the same plugin id twice and the
|
|
205
|
+
host's plugin list shows one of them as failed.
|
|
206
|
+
|
|
140
207
|
Built on the official
|
|
141
208
|
[OpenCode V2 CLI plugin API](https://opencode.ai/v2/docs/build/plugins/cli).
|
|
142
209
|
|
|
@@ -1,95 +1,173 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./flight-deck.schema.json",
|
|
3
|
+
|
|
4
|
+
// ═════════════════════════════════════════════════════════════════════════
|
|
5
|
+
// ✈ Flight Deck — configuration
|
|
6
|
+
//
|
|
7
|
+
// EVERYTHING HERE IS OPTIONAL. Install the plugin and the panel works with
|
|
8
|
+
// no config file at all. The values below are the defaults, written out so
|
|
9
|
+
// you can see exactly what there is to change. Delete any key and its
|
|
10
|
+
// default comes straight back.
|
|
11
|
+
//
|
|
12
|
+
// TO USE IT: copy this file to `flight-deck.jsonc` at your project root, or
|
|
13
|
+
// to `.opencode/flight-deck.jsonc`. Comments and trailing commas are fine.
|
|
14
|
+
//
|
|
15
|
+
// Flight Deck looks in this order and uses the first file it finds:
|
|
16
|
+
// .opencode/flight-deck.jsonc .opencode/flight-deck.json
|
|
17
|
+
// flight-deck.jsonc flight-deck.json
|
|
18
|
+
//
|
|
19
|
+
// The same values can also be passed as plugin options in opencode.jsonc /
|
|
20
|
+
// cli.json, which take precedence on hosts that forward them.
|
|
21
|
+
// ═════════════════════════════════════════════════════════════════════════
|
|
22
|
+
|
|
23
|
+
// ── Update cadence ───────────────────────────────────────────────────────
|
|
24
|
+
// Milliseconds between refreshes: the tick rate of everything that has to
|
|
25
|
+
// animate. The status spinner has ten frames, so 100 turns it once a second.
|
|
26
|
+
//
|
|
27
|
+
// Cost, tokens, and permissions arrive from the host's own events, so they
|
|
28
|
+
// stay current with no timer at all. Only clock-derived rows need one — and
|
|
29
|
+
// `elapsed` plus the spinner are the reason this exists. Without a tick they
|
|
30
|
+
// would sit frozen between turns.
|
|
31
|
+
//
|
|
32
|
+
// 100 default — the spinner turns once a second, the clock stays live
|
|
33
|
+
// 50 twice as lively, still negligible work per tick
|
|
34
|
+
// 1000 a calm wall-clock tick, but the spinner visibly stutters
|
|
35
|
+
// 0 no timer; `elapsed` and the spinner only move when the session does
|
|
36
|
+
//
|
|
37
|
+
// Anything faster than 16 (one frame at 60Hz) is clamped: a tick wakes the
|
|
38
|
+
// host's renderer, so a smaller value spends work without adding motion.
|
|
39
|
+
"refresh": 100,
|
|
40
|
+
|
|
41
|
+
// ── Sidebar ──────────────────────────────────────────────────────────────
|
|
42
|
+
"sidebar": {
|
|
43
|
+
// false hides the whole panel.
|
|
44
|
+
"enabled": true,
|
|
45
|
+
|
|
46
|
+
// Fixed lines, rendered above the live rows. This is the only text Flight
|
|
47
|
+
// Deck shows of its own — put your own words here, or a rule.
|
|
48
|
+
// The first line uses your theme's primary text colour; the rest use the
|
|
49
|
+
// subdued colour.
|
|
50
|
+
"lines": ["✈ FLIGHT DECK", "─────────────────"],
|
|
51
|
+
|
|
52
|
+
// The live rows, top to bottom. Every value is read from the open session,
|
|
53
|
+
// so you never type these in. Delete any row you don't want, or reorder
|
|
54
|
+
// them freely — an unknown name is ignored with a one-time warning, so a
|
|
55
|
+
// typo can never break the panel.
|
|
56
|
+
//
|
|
57
|
+
// status running or idle — the glyph turns while anything is working
|
|
58
|
+
// agent which agent is running (orchestrator, build, plan, ...)
|
|
59
|
+
// model model id, plus the variant when there is one
|
|
60
|
+
// branch current git branch
|
|
61
|
+
// cost what this session has cost so far
|
|
62
|
+
// caution the annunciator: silent unless something stopped moving
|
|
63
|
+
// cost this conversation, plus its subagents when any ran
|
|
64
|
+
// project every session in this repo, not just the one on screen
|
|
65
|
+
// tokens this session's input and output tokens
|
|
66
|
+
// cache cache hit rate, then cache reads
|
|
67
|
+
// context a gauge of how full the context window is
|
|
68
|
+
// perms what is waiting for approval, not just how many
|
|
69
|
+
// elapsed wall-clock time since the session started
|
|
70
|
+
// tps output tokens per second on the last completed turn
|
|
71
|
+
// spark recent turn sizes as a sparkline (available, off by default)
|
|
72
|
+
// reasoning reasoning tokens, when the model emits them
|
|
73
|
+
// turns number of messages in the session
|
|
74
|
+
"rows": [
|
|
75
|
+
"caution",
|
|
76
|
+
"status",
|
|
77
|
+
"agent",
|
|
78
|
+
"model",
|
|
79
|
+
"branch",
|
|
80
|
+
"cost",
|
|
81
|
+
"project",
|
|
82
|
+
"tokens",
|
|
83
|
+
"cache",
|
|
84
|
+
"context",
|
|
85
|
+
"perms",
|
|
86
|
+
"elapsed",
|
|
87
|
+
"tps"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// ── Footer ───────────────────────────────────────────────────────────────
|
|
92
|
+
// Off by default: the sidebar already carries the data, and the prompt
|
|
93
|
+
// footer is high-traffic space, so a line there should earn its place.
|
|
94
|
+
//
|
|
95
|
+
// Writing ANY footer setting turns it on — `"footer": { "text": "hi" }` is
|
|
96
|
+
// enough. Set "enabled": false explicitly to keep it hidden.
|
|
97
|
+
"footer": {
|
|
98
|
+
"enabled": false,
|
|
99
|
+
// Any single line. Empty text is ignored.
|
|
100
|
+
"text": "Flight Deck"
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
// -- Caution ---------------------------------------------------------------
|
|
104
|
+
// The annunciator: a warning row for the one failure nothing else can see.
|
|
105
|
+
//
|
|
106
|
+
// A hang emits NO events - no completion, no error, nothing - so everything
|
|
107
|
+
// observable about it is the absence of a signal. That is why this uses a
|
|
108
|
+
// clock and a baseline instead of a listener.
|
|
109
|
+
//
|
|
110
|
+
// It is silent unless something has stopped moving, so it costs nothing on a
|
|
111
|
+
// healthy session. When it speaks it reports what it saw, never what it
|
|
112
|
+
// means: `shell running 8m41s`, not "stuck". A ten-minute build is not a hang.
|
|
113
|
+
//
|
|
114
|
+
// It never aborts, kills, retries or blocks anything. Read-only.
|
|
115
|
+
"caution": {
|
|
116
|
+
"enabled": true,
|
|
117
|
+
|
|
118
|
+
// A tool running longer than this draws a subdued triangle...
|
|
119
|
+
"toolWatchSeconds": 180,
|
|
120
|
+
// ... and longer than this becomes a real caution.
|
|
121
|
+
// Raised to match the watch value if you set it lower.
|
|
122
|
+
"toolCautionSeconds": 420,
|
|
123
|
+
|
|
124
|
+
// A running session that has produced nothing for this long is noted.
|
|
125
|
+
// Deliberately generous: a large reasoning model can think for minutes
|
|
126
|
+
// with nothing to show, which the clock cannot distinguish from a wedge.
|
|
127
|
+
// Suppressed entirely while a tool or shell is running.
|
|
128
|
+
"turnWatchSeconds": 600,
|
|
129
|
+
"turnCautionSeconds": 1200,
|
|
130
|
+
|
|
131
|
+
// Identical consecutive calls before it counts as a loop. Two is a retry.
|
|
132
|
+
// Applies to identical successes and identical failures alike.
|
|
133
|
+
"repeatThreshold": 3,
|
|
134
|
+
|
|
135
|
+
// Tools that are slow by NATURE, so slow is not an anomaly for them.
|
|
136
|
+
// Matched by exact name.
|
|
137
|
+
//
|
|
138
|
+
// Calibrated against 53,672 real tool calls: at the default threshold, 307
|
|
139
|
+
// calls exceed it and 218 of those are these tools. `subagent` alone
|
|
140
|
+
// crossed 152 times, with a p99 of 14.7 minutes. Without this list the
|
|
141
|
+
// annunciator lights on every delegated task - which is how an alert gets
|
|
142
|
+
// ignored. Add your own long-running or orchestration tools here.
|
|
143
|
+
"exemptTools": ["question", "task", "subagent", "agent", "delegate", "delegate_many", "delegate_task"],
|
|
144
|
+
|
|
145
|
+
// Also raise a toast, once per distinct problem, re-arming when the session
|
|
146
|
+
// goes quiet. Off by default: the rail is the signal, a notification is an
|
|
147
|
+
// interruption. Turn it on if you walk away from long runs.
|
|
148
|
+
"toast": false
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
// -- Layout ----------------------------------------------------------------
|
|
152
|
+
// Row geometry. Change these when your terminal is unusually narrow or wide.
|
|
153
|
+
"layout": {
|
|
154
|
+
// Width of the label column every row pads to. 10 fits "caution" plus a
|
|
155
|
+
// space. Narrow it to fit more value on screen.
|
|
156
|
+
"labelWidth": 10,
|
|
157
|
+
// Cells in the `context` gauge.
|
|
158
|
+
"barWidth": 10,
|
|
159
|
+
// Samples drawn in the `spark` row. The newest turns are kept, so
|
|
160
|
+
// narrowing this keeps the recent shape rather than the oldest.
|
|
161
|
+
"sparkWidth": 12
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
// -- Glyphs ----------------------------------------------------------------
|
|
165
|
+
// The annunciator's characters. Change these if your terminal renders a
|
|
166
|
+
// default as a box or at the wrong width - an ugly but readable panel beats
|
|
167
|
+
// an unreadable one. One or two characters each.
|
|
168
|
+
"glyphs": {
|
|
169
|
+
"watch": "▲",
|
|
170
|
+
"caution": "⚠",
|
|
171
|
+
"clear": "○"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/nathwn12/oc-flight-deck/flight-deck.schema.json",
|
|
4
|
+
"title": "Flight Deck configuration",
|
|
5
|
+
"description": "Configuration for the oc-flight-deck TUI plugin. Every key is optional: install the plugin and it works with no config file at all. Copy flight-deck.example.jsonc to flight-deck.jsonc (or .opencode/flight-deck.jsonc) and edit. Comments and trailing commas are allowed. An invalid value is ignored, its default is restored, and a one-time toast names the key to fix — a typo can never break the TUI.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Points an editor or an AI at this file, which is the authoritative list of every option, type, default and valid value."
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"refresh": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"minimum": 0,
|
|
17
|
+
"maximum": 60000,
|
|
18
|
+
"default": 100,
|
|
19
|
+
"description": "Milliseconds between ticks. Cost and tokens arrive with host events; anything derived from the clock — `elapsed`, the status spinner, and the caution thresholds — needs this timer. 100 turns the spinner once a second. 0 turns the ticker off entirely, which also freezes the annunciator (it works, but only updates on host events). Practical range 16–1000; below 16 is treated as 16."
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"sidebar": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"description": "The rail itself: the branding lines and the live rows.",
|
|
26
|
+
"properties": {
|
|
27
|
+
"enabled": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": true,
|
|
30
|
+
"description": "Draw the sidebar rail at all. false leaves the plugin loaded but invisible."
|
|
31
|
+
},
|
|
32
|
+
"lines": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "type": "string" },
|
|
35
|
+
"default": ["✈ FLIGHT DECK", "─────────────────"],
|
|
36
|
+
"maxItems": 24,
|
|
37
|
+
"description": "Fixed lines rendered above the live rows, in order. Branding or a separator. These render at full brightness; the live rows below them are dimmed."
|
|
38
|
+
},
|
|
39
|
+
"rows": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "enum": ["caution", "status", "agent", "model", "branch", "cost", "total", "project", "tokens", "cache", "context", "perms", "elapsed", "tps", "spark", "reasoning", "turns"] },
|
|
42
|
+
"default": ["caution", "status", "agent", "model", "branch", "cost", "project", "tokens", "cache", "context", "perms", "elapsed", "tps"],
|
|
43
|
+
"maxItems": 24,
|
|
44
|
+
"description": "Which live fields to draw, top to bottom. Any subset, any order — this is the single most useful thing to change. Rows with no data are omitted entirely, so a narrow rail grows rows as a session produces them rather than showing placeholders."
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
"footer": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"description": "A single line in the prompt footer. Off unless configured — writing any footer setting turns it on.",
|
|
53
|
+
"properties": {
|
|
54
|
+
"enabled": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Show the footer line. Defaults to true if any other footer key is present, false if the footer section is absent."
|
|
57
|
+
},
|
|
58
|
+
"text": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"default": "Flight Deck",
|
|
61
|
+
"description": "The footer text. Max 120 characters; control characters are replaced with spaces."
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
"caution": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"description": "The annunciator: a warning row for the one failure nothing else can see. A hang emits no events at all, so this uses a clock and a baseline rather than a listener. Silent unless something has stopped moving. It reports observations, never verdicts — `shell running 8m41s`, not 'stuck' — and it never aborts, kills, retries or blocks anything.",
|
|
70
|
+
"properties": {
|
|
71
|
+
"enabled": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"default": true,
|
|
74
|
+
"description": "Run the annunciator. false means the `caution` row never appears and no timer is spent on it."
|
|
75
|
+
},
|
|
76
|
+
"toolWatchSeconds": {
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"default": 180,
|
|
80
|
+
"description": "A tool running longer than this draws a subdued ▲. 180s is longer than a slow build and short enough to notice before you start wondering. Lower it if you work on fast tools and want to catch stalls sooner."
|
|
81
|
+
},
|
|
82
|
+
"toolCautionSeconds": {
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"minimum": 0,
|
|
85
|
+
"default": 420,
|
|
86
|
+
"description": "A tool running longer than this becomes a real ⚠. Raised to match toolWatchSeconds if set below it, and reported."
|
|
87
|
+
},
|
|
88
|
+
"turnWatchSeconds": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"minimum": 0,
|
|
91
|
+
"default": 600,
|
|
92
|
+
"description": "A running session that has produced nothing for this long draws a ▲. Deliberately generous: a large reasoning model can think for minutes with nothing to show, which is indistinguishable from a wedge by the clock alone. Suppressed entirely while a tool or shell is running."
|
|
93
|
+
},
|
|
94
|
+
"turnCautionSeconds": {
|
|
95
|
+
"type": "integer",
|
|
96
|
+
"minimum": 0,
|
|
97
|
+
"default": 1200,
|
|
98
|
+
"description": "A quiet session becomes a real ⚠ after this long. Raised to match turnWatchSeconds if set below it, and reported."
|
|
99
|
+
},
|
|
100
|
+
"repeatThreshold": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"minimum": 2,
|
|
103
|
+
"default": 3,
|
|
104
|
+
"description": "How many identical consecutive calls count as a loop. Two is a retry; three is a pattern. Applies to both the repeat rule (identical successes) and the failure rule (identical errors)."
|
|
105
|
+
},
|
|
106
|
+
"exemptTools": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": { "type": "string", "minLength": 1 },
|
|
109
|
+
"default": ["question", "task", "subagent", "agent", "delegate", "delegate_many", "delegate_task"],
|
|
110
|
+
"description": "Tools that are slow by nature, so slow is not an anomaly for them. Matched by exact name. Calibrated against 53,672 real tool calls: at the default threshold 307 calls exceed it and 218 of those are these tools — `subagent` alone crossed 152 times with a p99 of 14.7 minutes. Without this list the annunciator lights on every delegated task, which is how an alert gets ignored. Add your own long-running or orchestration tools here."
|
|
111
|
+
},
|
|
112
|
+
"toast": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"default": false,
|
|
115
|
+
"description": "Also raise a toast the first time a caution appears, once per distinct problem, re-arming when the session goes quiet. Off by default: the rail is the signal and a notification is an interruption. Worth enabling if you walk away from long runs."
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
"layout": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"description": "Row geometry. Change these when your terminal is unusually narrow or wide.",
|
|
124
|
+
"properties": {
|
|
125
|
+
"labelWidth": {
|
|
126
|
+
"type": "integer",
|
|
127
|
+
"minimum": 6,
|
|
128
|
+
"maximum": 24,
|
|
129
|
+
"default": 10,
|
|
130
|
+
"description": "Width of the label column that every row pads to. 10 fits `caution` plus a space. Narrow it to fit more value on screen, widen it if you rename the labels."
|
|
131
|
+
},
|
|
132
|
+
"barWidth": {
|
|
133
|
+
"type": "integer",
|
|
134
|
+
"minimum": 1,
|
|
135
|
+
"maximum": 40,
|
|
136
|
+
"default": 10,
|
|
137
|
+
"description": "Cells in the `context` gauge — the filled/empty bar."
|
|
138
|
+
},
|
|
139
|
+
"sparkWidth": {
|
|
140
|
+
"type": "integer",
|
|
141
|
+
"minimum": 2,
|
|
142
|
+
"maximum": 64,
|
|
143
|
+
"default": 12,
|
|
144
|
+
"description": "Samples drawn in the `spark` row. The newest turns are kept, so narrowing it keeps the recent shape rather than the oldest."
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
"glyphs": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"description": "The annunciator's characters. Change these when a terminal renders the defaults as a box, or at the wrong width — an ugly-but-readable panel beats an unreadable one. One or two characters each.",
|
|
153
|
+
"properties": {
|
|
154
|
+
"watch": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"minLength": 1,
|
|
157
|
+
"maxLength": 2,
|
|
158
|
+
"default": "▲",
|
|
159
|
+
"description": "Shown for a watch: something is slower than it should be, but below the caution threshold."
|
|
160
|
+
},
|
|
161
|
+
"caution": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"minLength": 1,
|
|
164
|
+
"maxLength": 2,
|
|
165
|
+
"default": "⚠",
|
|
166
|
+
"description": "Shown for a real caution. This is the row that has to read at a glance."
|
|
167
|
+
},
|
|
168
|
+
"clear": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"minLength": 1,
|
|
171
|
+
"maxLength": 2,
|
|
172
|
+
"default": "○",
|
|
173
|
+
"description": "Reserved for a future always-visible annunciator state. Not currently drawn: the row is absent when nothing is wrong."
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oc-flight-deck",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Live OpenCode V2 session telemetry — agent, model, branch, cost, tokens, cache hit rate and context usage in your sidebar.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"files": [
|
|
37
37
|
"src",
|
|
38
38
|
"flight-deck.example.jsonc",
|
|
39
|
+
"flight-deck.schema.json",
|
|
39
40
|
"README.md",
|
|
40
41
|
"LICENSE"
|
|
41
42
|
],
|