oc-flight-deck 0.24.0 → 0.25.1

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/docs/GUIDE.md CHANGED
@@ -89,13 +89,14 @@ One global file: `~/.config/opencode/flight-deck.jsonc`. The `.json` name is als
89
89
 
90
90
  | Key | Default | Effect |
91
91
  | --- | --- | --- |
92
+ | **`lifetimeTotalsPath`** | `~/.local/share/opencode/flight-deck/totals.json` | Optional file for the lifetime total's high-water mark. A non-empty string overrides it; malformed values fall back and are reported. |
92
93
  | **`sidebar.enabled`** | `true` | `false` leaves the plugin loaded but invisible. |
93
- | **`sidebar.rows`** | `["status","agent","model","cost","project","tokens","cache","context","perms","elapsed","tps"]` | Live rows, top to bottom, any subset in any order. Max 24 names; unknown names are ignored with a one-time warning. |
94
+ | **`sidebar.rows`** | `["status","agent","model","spend","project","tokens","cache","context","perms","elapsed","tps"]` | Live rows, top to bottom, any subset in any order. Max 24 names; unknown names are ignored with a one-time warning. `cost`, `total` and `session` stay accepted as aliases of `spend`, `lifetime` and `ses`. |
94
95
  | **`sidebar.lines`** | `[]` | Fixed lines above the rows. Max 24. These plus rows share the rail cap (`maxLines`); fixed lines render at full brightness while live rows are dimmed. |
95
96
  | **`sidebar.footer.lines`** | `[]` | Fixed lines in the host footer slot, outside the rail cap; max 24. |
96
97
  | **`sidebar.footer.go`** | `false` | `true` or an object draws the live Go usage panel. Object keys: `header` (`false`), `barWidth` (`10`, 1–40), `labelWidth` (`6`, 5–24, auto-widens), `percent` (`true`), `reset` (`true`), `align` (`"right"`, left, right, or center), `sweep` (`false`), `labels` (`{rolling,weekly,monthly}`, each 1–24 chars), `blink` (`true`), `blinkMs` (`700`, 200–5000). |
97
- | **`sidebar.persist`** | `true` | Every named row renders, drawing its zero skeleton until data arrives; `false` omits rows with no data. |
98
- | **`sidebar.placeholder`** | `"—"` | Non-empty string; only for a data-less row with no skeleton. `caution` never draws it, and `updated` draws it until the host records an action. |
98
+ | **`sidebar.persist`** | `true` | Every named row renders, drawing an honest zero until data arrives; `false` omits rows with no data. |
99
+ | **`sidebar.placeholder`** | `"0"` | Non-empty string; only for a data-less row with no zero of its own. Numeric rows never use it. `caution` stays silent, and `updated` draws it until the host records an action. |
99
100
  | **`sidebar.maxLines`** | `24` | Whole rail, fixed lines plus rows, 1–24. |
100
101
  | **`sidebar.tps.scope`** | `"family"` | `"family"` paces the open session plus subagents; `"session"` paces the open session alone. |
101
102
  | **`sidebar.tps.display`** | `"rt"` | `"rt"` estimated realtime throughput plus observed TTFT, `"avg"` settled-turn average, `"both"` both figures plus TTFT. |
@@ -156,6 +157,7 @@ One global file: `~/.config/opencode/flight-deck.jsonc`. The `.json` name is als
156
157
  | **`glyphs.watch`** | `"▲"` | The watch glyph, 1–2 chars. |
157
158
  | **`glyphs.caution`** | `"●"` | The caution glyph, 1–2 chars. |
158
159
  | **`glyphs.clear`** | `"○"` | Reserved, not drawn today. |
160
+ | **`glyphs.paused`** | `"‖"` | The status row's paused mark, 1–2 chars. Draws `‖ paused` when a permission or a question tool waits on the person. |
159
161
 
160
162
  **Style**
161
163
 
@@ -171,12 +173,14 @@ Every name `sidebar.rows` accepts, what its number means, and whether it draws b
171
173
  | Row | What it shows | Default |
172
174
  | --- | --- | --- |
173
175
  | `caution` | Annunciator, opt-in with `caution.enabled`. Silent unless a tool or turn stops moving. Reports observations, never verdicts (`shell running 8m41s`). Never aborts, kills, retries, or blocks. `▲` watch, `●` caution, `○` reserved and not drawn. | opt-in |
174
- | `status` | `⠙ running` while anything works (this session, a subagent, or a shell); `○ idle` otherwise. | yes |
176
+ | `status` | `‖ paused` when a permission or a `question` tool waits on the person; `⠙ running` with real evidence of work (a live tool, shell, child or open turn); `○ idle` otherwise. A stale host `running` flag with no evidence reads idle. | yes |
175
177
  | `agent` | Active agent name. | yes |
176
178
  | `model` | Model id, plus ` · variant` when one is present. | yes |
177
179
  | `branch` | Current git branch. Costs a VCS call. | opt-in |
178
- | `cost` | Money for this conversation plus its subagent tree. With `total` on the rail, this row shows the session's own figure. Merged shape `$1.84 · 3 subagents`; childless shows `$1.84`. | yes |
179
- | `total` | Family total plus subagent count, `$1.84 · 0 subagents` when childless. | opt-in |
180
+ | `spend` | The current model's spend for this session only. When the rail already shows `lifetime`, this row shows the session's own figure; otherwise it merges the subagent total into itself. Merged shape `$1.84 · 3 subagents`; childless shows `$1.84`. | yes |
181
+ | `lifetime` | Family total plus subagent count, all models, `$1.84 · 0 subagents` when childless. A durable high-water mark: the highest figure seen for the family root is kept in `~/.local/share/opencode/flight-deck/totals.json`, so a restart or host pruning cannot lower the row. | opt-in |
182
+ | `cost` | Alias for `spend`; accepted in `sidebar.rows` and folded to it. Old configs keep the `cost` label. | yes |
183
+ | `total` | Alias for `lifetime`; accepted in `sidebar.rows` and folded to it. Old configs keep the `total` label. | opt-in |
180
184
  | `project` | Every session in the project: `$12.40 · 21 sessions` when more than one, else just the figure. | yes |
181
185
  | `tokens` | `1.2M in · 84k out`, same family scope as `cost`. | yes |
182
186
  | `cache` | `92% hit · 1.1M read`, family scope. The hit-rate denominator is cache read plus input; cache write is excluded because a write is not a lookup. A zero read is drawn (`0 read`, or `0% hit · 0 read` when input exists), never hidden. | yes |
@@ -184,7 +188,7 @@ Every name `sidebar.rows` accepts, what its number means, and whether it draws b
184
188
  | `perms` | Pending approvals. One names the action plus an 18-cell clipped resource (`bash · src/tui…`); several lead with the count (`3 waiting · bash`). | yes |
185
189
  | `elapsed` | Active generation time, recomputed from the assistant-turn spans the host recorded for this session and its subagents. Survives a restart, never steps backwards while the host reports those turns, and is not wall-clock since the session began. | yes |
186
190
  | `updated` | Absolute timestamp of the newest action the host recorded: the latest message's `completed`, else `streamed`, else `created` stamp. The host locale and time zone apply by default; `format.timestamp` sets the locale, date and time styles, the 12/24-hour clock, and an IANA zone or UTC offset. A Windows zone id is rejected and the host zone is used. | opt-in |
187
- | `tps` | Session speed. Default `rt`: estimated realtime throughput from streaming delta bytes and observed mean TTFT after steps settle; TTFT remains visible when no rate is available. `avg` selects the settled-turn average; `both` shows both rates. Scope `family` includes subagents; `session` covers the open session. With neither a rate nor TTFT, `persist: true` draws the placeholder and `persist: false` omits the row. | yes |
191
+ | `tps` | Session speed. Default `rt`: estimated realtime throughput from streaming delta bytes and observed mean TTFT after steps settle; TTFT rides only while a rate stands. `avg` selects the settled-turn average; `both` shows both rates. Scope `family` includes subagents; `session` covers the open session. With no rate the row draws `0 <sidebar.tps.label>` (`0 tok/s` shipped), never a placeholder or a ttft-only fallback. | yes |
188
192
  | `spark` | Recent turn sizes as a sparkline; the newest samples are kept. | opt-in |
189
193
  | `reasoning` | Reasoning tokens, family scope. | opt-in |
190
194
  | `turns` | Prompts sent this session. | opt-in |
@@ -194,7 +198,7 @@ Every name `sidebar.rows` accepts, what its number means, and whether it draws b
194
198
  | `ses` | Clipped 18-cell preview of the session id (less when the label column is narrow, floored at 8), labelled `session`. Click copies the full id. A verified copy is silent: the host write reports `written`, or an exact clipboard read-back confirms an OSC52 dispatch. An unconfirmed dispatch is an advisory warning (paste to verify). Gate the failure toast with `notifications.copy`. | opt-in |
195
199
  | `session` | Alias for `ses`; accepted in `sidebar.rows` and folded to it. | opt-in |
196
200
 
197
- With `sidebar.persist` (the default) named rows render even without data. Most draw a zero skeleton: `$0.000` money rows, `0 in · 0 out`, `0 read`, empty gauge plus `~0%`, `0 waiting`, `0s`, flat `▁` spark, `0` reasoning and turns, `○ 0 ○ 0 ○ 0` go, `○ idle`, `none` agent, model, and ses, `no branch`, `unknown` guard. `caution` stays silent; `tps` and `updated` draw `sidebar.placeholder` (`—`) when unavailable. Set `persist: false` to omit rows with no data instead.
201
+ With `sidebar.persist` (the default) named rows render even without data. Numeric rows draw an honest zero: `$0.000` money rows, `0 in · 0 out`, `0 read`, `~0 used`, `0s`, `0` reasoning and turns, `0 tok/s` tps, plus the zero forms of the gauge and spark. `caution` stays silent; `updated` draws `sidebar.placeholder` (`0` by default) because there is no honest zero timestamp. Set `persist: false` to omit rows with no data instead.
198
202
 
199
203
  ### Recipes
200
204
 
@@ -53,6 +53,11 @@
53
53
  // host's renderer, so a smaller value spends work without adding motion.
54
54
  "refresh": 100,
55
55
 
56
+ // Optional: where the durable high-water lifetime total is kept. Omit it to
57
+ // use `~/.local/share/opencode/flight-deck/totals.json`. A non-empty string
58
+ // is used as given; malformed values are reported and the default is used.
59
+ // ,"lifetimeTotalsPath": "/tmp/flight-deck-totals.json",
60
+
56
61
  // ── Sidebar ──────────────────────────────────────────────────────────────
57
62
  "sidebar": {
58
63
  // false hides the whole panel.
@@ -117,25 +122,23 @@
117
122
  // agent which agent is running (orchestrator, build, plan, ...)
118
123
  // model model id, plus the variant when there is one
119
124
  // branch current git branch. Off by default — costs a VCS call
120
- // cost this conversation, plus every subagent session in its tree
121
- // (the host links those by parentID); with `total` on the
122
- // rail, the session figure alone. It cannot see spend from an
123
- // independently spawned top-level session: the rollup follows
124
- // the host's parentID link only (family()), a session spawned
125
- // as an independent top-level session carries no parentID,
126
- // and the host returned no metadata field for the sessions
127
- // probed during this work — so there is no automatic creator
128
- // link today. The `project` row is the surface that covers
129
- // every session in the project, spawned included
130
- // total the family total and subagent count on a row of its own —
131
- // the session's own cost with `0 subagents` when it spawned
132
- // none, never a blank row
125
+ // spend the current model's spend for this session only. `cost` is
126
+ // an accepted alias and renders the same row. It cannot see
127
+ // spend from an independently spawned top-level session: the
128
+ // rollup follows the host's parentID link only (family()),
129
+ // and a session spawned as an independent top-level session
130
+ // carries no parentID. `project` covers every session in the
131
+ // project, spawned included
132
+ // lifetime the durable family total and subagent count on a row of its
133
+ // own — all models, this session plus its subagents, kept as
134
+ // a high-water mark across restarts. `total` is an accepted
135
+ // alias. `0 subagents` when it spawned none, never a blank
133
136
  // project every session in this project, not just the one on screen
134
- // tokens input and output, in the same family scope as `cost`: this
137
+ // tokens input and output, in the same family scope as `spend`: this
135
138
  // conversation plus its subagent sessions when any exist,
136
139
  // the session alone when there are none
137
140
  // cache cache hit rate, then cache reads, in the same family scope
138
- // as `cost`
141
+ // as `spend`
139
142
  // context a gauge of how full the context window is
140
143
  // perms what is waiting for approval, not just how many
141
144
  // elapsed active time recomputed from the assistant-turn spans the host
@@ -159,7 +162,7 @@
159
162
  // `both` draws both on one line
160
163
  // spark recent turn sizes as a sparkline
161
164
  // reasoning reasoning tokens, when the model emits them, in the same
162
- // family scope as `cost`
165
+ // family scope as `spend`
163
166
  // turns how many prompts you have sent this session
164
167
  // guard harness status from oc-harness-guard: breaches, orphans,
165
168
  // findings, or ok. Available, off by default.
@@ -180,16 +183,16 @@
180
183
  // the rename at every `layout.labelWidth`. Off by default; needs the host's mouse.
181
184
  //
182
185
  // Every named row renders persistently, so the rail keeps a stable shape:
183
- // a row with no data yet draws a real-looking zero — `$0.000` for money
184
- // rows and `0 in · 0 out` for tokens. `caution` stays silent; `tps` and
185
- // `updated` draw `sidebar.placeholder` (`—`) when data is unavailable.
186
- // The fixed lines and live rows share the maxLines budget below, and
187
- // anything past it is dropped.
186
+ // a numeric row with no data yet draws an honest zero — `$0.000` for
187
+ // money rows, `0 in · 0 out` for tokens, `0 tok/s` for tps. `caution`
188
+ // stays silent; `updated` draws `sidebar.placeholder` because there is no
189
+ // honest zero timestamp. The fixed lines and live rows share the maxLines
190
+ // budget below, and anything past it is dropped.
188
191
  "rows": [
189
192
  "status",
190
193
  "agent",
191
194
  "model",
192
- "cost",
195
+ "spend",
193
196
  "project",
194
197
  "tokens",
195
198
  "cache",
@@ -231,7 +234,19 @@
231
234
  // so a restart forgets them. `rt` also shows TTFT when available.
232
235
  // An unknown value falls back to `"rt"` and
233
236
  // is reported.
234
- "tps": { "scope": "family", "display": "rt" },
237
+ //
238
+ // `"label"` is the suffix on the single-figure rows: `"rt"` draws
239
+ // `N <label>` and `"avg"` draws the same. The shipped `"tok/s"` keeps
240
+ // today's output; set it to `"rt"` to name the realtime figure after its
241
+ // half. `"both"` already names its two halves `rt` and `avg`, so it
242
+ // ignores this key. The value is trimmed; blank, non-string and overlong
243
+ // values fall back to `"tok/s"` and are reported.
244
+ //
245
+ // `"ttft"` controls the mean time to first token (`1.2s ttft`). On (the
246
+ // default) it rides along beside the figures, and is the whole fallback
247
+ // row when no rate can be drawn. Set it to false to hide that segment in
248
+ // every display mode: with no rate, the row hides instead.
249
+ "tps": { "scope": "family", "display": "rt", "label": "tok/s", "ttft": true },
235
250
 
236
251
  // Every named row renders persistently: with no data yet it draws its
237
252
  // zero skeleton or placeholder, in the
@@ -239,10 +254,11 @@
239
254
  // instead.
240
255
  "persist": true,
241
256
 
242
- // Fallback for a persistent row with no data that has no skeleton. Any
243
- // non-empty string. `caution` never draws it (its silence is the design),
244
- // and `tps` and `updated` draw it until data is available.
245
- "placeholder": "—",
257
+ // Fallback for a persistent row with no zero of its own. Any non-empty
258
+ // string; `0` by default. Numeric rows never use it — they draw a real
259
+ // zero. `caution` stays silent (its silence is the design), and `updated`
260
+ // draws it until data is available.
261
+ "placeholder": "0",
246
262
 
247
263
  // Maximum total height, including fixed lines and live rows. Defaults to 24.
248
264
  "maxLines": 24
@@ -393,13 +409,15 @@
393
409
  },
394
410
 
395
411
  // -- Glyphs ----------------------------------------------------------------
396
- // The annunciator's characters. Change these if your terminal renders a
397
- // default as a box or at the wrong width - an ugly but readable panel beats
398
- // an unreadable one. One or two characters each.
412
+ // The rail's status marks. Change these if your terminal renders a default
413
+ // as a box or at the wrong width - an ugly but readable panel beats an
414
+ // unreadable one. One or two characters each.
399
415
  "glyphs": {
400
416
  "watch": "▲",
401
417
  "caution": "●",
402
- "clear": "○"
418
+ "clear": "○",
419
+ // The status row's paused mark: one glyph plus the word `paused`.
420
+ "paused": "‖"
403
421
  },
404
422
 
405
423
  // -- Style -----------------------------------------------------------------
@@ -19,6 +19,12 @@
19
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; 1–15 are treated as 16, while 0 is the deliberate off switch and is never clamped."
20
20
  },
21
21
 
22
+ "lifetimeTotalsPath": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "description": "Optional path to the durable high-water ledger for the `total` row. Leave it out to use `~/.local/share/opencode/flight-deck/totals.json`. A non-empty string is used as given; a malformed value is reported and the default path is used. Entries in this file are never deleted or expired."
26
+ },
27
+
22
28
  "sidebar": {
23
29
  "type": "object",
24
30
  "additionalProperties": false,
@@ -145,16 +151,16 @@
145
151
  },
146
152
  "rows": {
147
153
  "type": "array",
148
- "items": { "enum": ["caution", "status", "agent", "model", "branch", "cost", "total", "project", "tokens", "cache", "context", "perms", "elapsed", "updated", "tps", "spark", "reasoning", "turns", "guard", "go", "dex", "ses", "session"] },
149
- "default": ["status", "agent", "model", "cost", "project", "tokens", "cache", "context", "perms", "elapsed", "tps"],
154
+ "items": { "enum": ["caution", "status", "agent", "model", "branch", "spend", "lifetime", "cost", "total", "project", "tokens", "cache", "context", "perms", "elapsed", "updated", "tps", "spark", "reasoning", "turns", "guard", "go", "dex", "ses", "session"] },
155
+ "default": ["status", "agent", "model", "spend", "project", "tokens", "cache", "context", "perms", "elapsed", "tps"],
150
156
  "maxItems": 24,
151
- "description": "Which live fields to draw, top to bottom. Any subset, any order - this is the single most useful thing to change. With `sidebar.persist` (the default) every named row always renders, drawing its zero skeleton until the host has data (the opt-in `updated` row has no skeleton and draws `sidebar.placeholder` instead, because there is no honest zero timestamp); with `persist: false` rows with no data are omitted entirely. Counted together with `sidebar.lines` against a 24-line cap on the whole rail. The opt-in `ses` row shows a clipped preview of the session id under the `session` label - budget 18 cells, reduced by however much the label overflows `layout.labelWidth`, floored at 8 - and a mouse click on that row copies the full id to the OS clipboard: a host write reporting `written` or an exact clipboard read-back after the OSC52 dispatch verifies it, only a verified copy counts as success, a verified copy stays silent, and an unverified or failed outcome surfaces a toast gated by `notifications.copy`. `session` is accepted as an alias for `ses` and is normalized to it."
157
+ "description": "Which live fields to draw, top to bottom. Any subset, any order - this is the single most useful thing to change. With `sidebar.persist` (the default) every named row always renders, drawing its zero skeleton until the host has data (the opt-in `updated` row has no skeleton and draws `sidebar.placeholder` instead, because there is no honest zero timestamp); with `persist: false` rows with no data are omitted entirely. Counted together with `sidebar.lines` against a 24-line cap on the whole rail. The opt-in `ses` row shows a clipped preview of the session id under the `session` label - budget 18 cells, reduced by however much the label overflows `layout.labelWidth`, floored at 8 - and a mouse click on that row copies the full id to the OS clipboard: a host write reporting `written` or an exact clipboard read-back after the OSC52 dispatch verifies it, only a verified copy counts as success, a verified copy stays silent, and an unverified or failed outcome surfaces a toast gated by `notifications.copy`. `session` is accepted as an alias for `ses`, `cost` for `spend`, and `total` for `lifetime`. Aliases keep working forever; naming both an alias and its key renders the row once and reports the duplicate."
152
158
  },
153
159
  "tps": {
154
160
  "type": "object",
155
161
  "additionalProperties": false,
156
- "default": { "scope": "family", "display": "rt" },
157
- "description": "The `tps` row: which sessions it paces (`scope`) and which figure it draws (`display`). When selected it shows the settled-turn average over the whole family: on hosts that record turn timestamps, generation tokens (output plus reasoning) over assistant turns that recorded `streamed`, divided by the union of their `streamed − created` spans — in-flight turns excluded, idle gaps never billed; on hosts without turn timestamps, generation tokens over the borrowed active clock instead. `display: \"rt\"` draws the realtime figure from the host's streaming events instead — an estimate from delta bytes while a turn streams, reading zero while nothing generates; `\"both\"` draws both figures on one line, plus the mean time to first token over settled steps (`1.2s ttft`) — per step, the earliest delta's event time minus the step's `started` dispatch stamp, pushed into the scope's ring when the step ends and kept in memory for the plugin's lifetime.",
162
+ "default": { "scope": "family", "display": "rt", "label": "tok/s", "ttft": true },
163
+ "description": "The `tps` row: which sessions it paces (`scope`), which figure it draws (`display`), what suffix the single-figure rows print (`label`), and whether the observed time to first token may show (`ttft`). When selected it shows the settled-turn average over the whole family: on hosts that record turn timestamps, generation tokens (output plus reasoning) over assistant turns that recorded `streamed`, divided by the union of their `streamed − created` spans — in-flight turns excluded, idle gaps never billed; on hosts without turn timestamps, generation tokens over the borrowed active clock instead. `display: \"rt\"` draws the realtime figure from the host's streaming events instead — an estimate from delta bytes while a turn streams, reading zero while nothing generates; `\"both\"` draws both figures on one line, plus the mean time to first token over settled steps (`1.2s ttft`) — per step, the earliest delta's event time minus the step's `started` dispatch stamp, pushed into the scope's ring when the step ends and kept in memory for the plugin's lifetime. `ttft: false` suppresses that segment in every display mode.",
158
164
  "properties": {
159
165
  "scope": {
160
166
  "type": "string",
@@ -167,19 +173,30 @@
167
173
  "enum": ["avg", "rt", "both"],
168
174
  "default": "rt",
169
175
  "description": "Which figure the `tps` row draws. `avg` is the settled-turn average: on hosts that record turn timestamps, generation tokens over assistant turns with `streamed` recorded, divided by the union of their `streamed - created` spans, in the row's scope; on hosts without them, generation tokens over the borrowed active clock. `rt` is the realtime figure from the host's streaming events — an estimate from delta bytes while a turn streams, reading zero while nothing generates. `both` draws `rt` and `avg` on one line (`106 rt · 41 avg`), plus the mean time to first token over settled steps (`83 rt · 38 avg · 1.2s ttft`): per step, the earliest text/reasoning delta's event time minus the step's `started` dispatch stamp (request dispatch time, before waiting for provider output), pushed into the scope's ring when the step ends — the mean covers the most recent finalized steps observed while the plugin ran (in-memory; a restart forgets them). An unknown value falls back to `rt` and is reported."
176
+ },
177
+ "label": {
178
+ "type": "string",
179
+ "maxLength": 16,
180
+ "default": "tok/s",
181
+ "description": "Short suffix printed after the number on the single-figure `tps` rows: `display: \"rt\"` draws `N <label>` and `display: \"avg\"` draws the same. The shipped `tok/s` keeps a new user's output unchanged; set it to `rt` to name the realtime figure after its half. `display: \"both\"` ignores this key because it already names its two halves `rt` and `avg`. The value is trimmed; a blank, non-string or overlong value falls back to `tok/s` and is reported."
182
+ },
183
+ "ttft": {
184
+ "type": "boolean",
185
+ "default": true,
186
+ "description": "Whether the `tps` row may draw the observed mean time to first token over settled steps (`1.2s ttft`). On, the default, the segment rides along beside the figures — including `display: \"rt\"`'s fallback row, shown when no rate can be drawn. Off, it is suppressed in every display mode, and with no rate there is no row at all. A non-boolean value falls back to `true` and is reported."
170
187
  }
171
188
  }
172
189
  },
173
190
  "persist": {
174
191
  "type": "boolean",
175
192
  "default": true,
176
- "description": "Render named fields persistently. Most show zero skeletons before data arrives; `tps` and `updated` use `sidebar.placeholder` when unavailable, while `caution` stays silent. False omits fields without data."
193
+ "description": "Render named fields persistently. Numeric rows now draw a sane zero before data arrives; only `updated` (no honest zero timestamp) and a few text rows with no zero use `sidebar.placeholder`, while `caution` stays silent. False omits fields without data."
177
194
  },
178
195
  "placeholder": {
179
196
  "type": "string",
180
197
  "minLength": 1,
181
- "default": "—",
182
- "description": "Fallback value for a persistent row with no data that has no skeleton. Used only when `sidebar.persist` is true. Must be a non-empty string; anything else falls back to the default em dash. `caution` never draws it because its silence is the design, and `updated` uses it until the host records an action — there is no honest zero timestamp."
198
+ "default": "0",
199
+ "description": "Fallback value for a persistent row with no zero of its own. Used only when `sidebar.persist` is true. Must be a non-empty string; anything else falls back to the default `0`. Numeric rows never use it: they draw a real zero instead. `caution` stays silent, and `updated` uses it until the host records an action because there is no honest zero timestamp."
183
200
  },
184
201
  "maxLines": {
185
202
  "type": "integer",
@@ -377,7 +394,7 @@
377
394
  "glyphs": {
378
395
  "type": "object",
379
396
  "additionalProperties": false,
380
- "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.",
397
+ "description": "The rail's status marks: one per annunciator severity, plus the paused mark for the status row. 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.",
381
398
  "properties": {
382
399
  "watch": {
383
400
  "type": "string",
@@ -399,6 +416,13 @@
399
416
  "maxLength": 2,
400
417
  "default": "○",
401
418
  "description": "Reserved for a future always-visible annunciator state. Not currently drawn: the row is absent when nothing is wrong."
419
+ },
420
+ "paused": {
421
+ "type": "string",
422
+ "minLength": 1,
423
+ "maxLength": 2,
424
+ "default": "‖",
425
+ "description": "Shown on the `status` row when a permission request is pending or a `question` tool is waiting on the person. One glyph plus one word: `‖ paused`."
402
426
  }
403
427
  }
404
428
  },
@@ -450,10 +474,10 @@
450
474
  }
451
475
  },
452
476
  "propertyNames": {
453
- "enum": ["*", "caution", "status", "agent", "model", "branch", "cost", "total", "project", "tokens", "cache", "context", "perms", "elapsed", "updated", "tps", "spark", "reasoning", "turns", "guard", "go", "dex", "ses", "session"]
477
+ "enum": ["*", "caution", "status", "agent", "model", "branch", "spend", "lifetime", "cost", "total", "project", "tokens", "cache", "context", "perms", "elapsed", "updated", "tps", "spark", "reasoning", "turns", "guard", "go", "dex", "ses", "session"]
454
478
  },
455
479
  "default": { "*": { "color": "subdued", "attributes": [] } },
456
- "description": "Style all live rows under `*`, then optionally override any known row name such as `cost`. A row can change one field and inherit the other from `*`; unknown row names are reported and ignored. `session` is accepted as an alias for `ses` and is normalized to it."
480
+ "description": "Style all live rows under `*`, then optionally override any known row name such as `cost`. A row can change one field and inherit the other from `*`; unknown row names are reported and ignored. `session` is accepted as an alias for `ses`, `cost` for `spend`, and `total` for `lifetime`. Aliases keep working forever; naming both an alias and its key renders the row once and reports the duplicate."
457
481
  }
458
482
  }
459
483
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-flight-deck",
3
- "version": "0.24.0",
3
+ "version": "0.25.1",
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",
@@ -60,14 +60,14 @@
60
60
  "access": "public"
61
61
  },
62
62
  "dependencies": {
63
- "@opencode/plugin": "^2.2.5"
63
+ "@opencode/plugin": "^2.3.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@opencode/plugin": "2.2.6",
67
- "@opentui/core": "^0.8.3",
68
- "@opentui/solid": "^0.8.3",
66
+ "@opencode/plugin": "2.3.0",
67
+ "@opentui/core": "^0.9.0",
68
+ "@opentui/solid": "^0.9.0",
69
69
  "@types/bun": "^1.4.4",
70
- "solid-js": "1.9.18",
70
+ "solid-js": "1.9.19",
71
71
  "string-width": "7.2.0",
72
72
  "typescript": "^7.0.2"
73
73
  },
@@ -63,6 +63,12 @@ interface CautionInput {
63
63
  readonly shells?: readonly unknown[];
64
64
  readonly now: number;
65
65
  readonly sessionRunning: boolean;
66
+ /**
67
+ * True only while a turn is genuinely open: the newest message is a user
68
+ * message, or the newest assistant message has no `time.completed`. A stale
69
+ * host `running` flag with a closed turn must not drive the silent clock.
70
+ */
71
+ readonly openTurn?: boolean;
66
72
  readonly lastMessageAt?: number;
67
73
  readonly thresholds: CautionThresholds;
68
74
  }
@@ -88,7 +94,7 @@ function asText(value: unknown): string | undefined {
88
94
  }
89
95
 
90
96
  /** Statuses that mean a tool has stopped. Anything else counts as live. */
91
- const SETTLED_TOOL = new Set(["completed", "error", "aborted", "cancelled"]);
97
+ export const SETTLED_TOOL = new Set(["completed", "error", "aborted", "cancelled"]);
92
98
 
93
99
  interface ToolCall {
94
100
  readonly name: string;
@@ -293,15 +299,18 @@ export function detectCautions(input: CautionInput): Caution[] {
293
299
  }
294
300
  }
295
301
 
296
- // Rule 5 — running, but nothing is moving.
302
+ // Rule 5 — an OPEN turn that is not moving.
297
303
  //
298
- // A live tool or shell is progress and rules 1 and 2 own it, so this stays out
299
- // of the way whenever one exists — including an exempt one, because an exempt
300
- // tool is usually waiting on a person.
304
+ // The host's `running` flag alone is not enough: it goes stale when a turn
305
+ // closes without the host clearing it, and then the clock runs on an idle
306
+ // session. The newest message must still be open. A live tool or shell is
307
+ // progress and rules 1 and 2 own it, so this stays out of their way too —
308
+ // including an exempt one, because an exempt tool is usually waiting on a
309
+ // person.
301
310
  const hasLiveWork =
302
311
  calls.some((call) => !SETTLED_TOOL.has(call.status)) ||
303
312
  shells.some((raw) => asRecord(raw)?.["status"] === "running");
304
- if (sessionRunning && !hasLiveWork) {
313
+ if (input.openTurn === true && sessionRunning && !hasLiveWork) {
305
314
  const settledAt = newestActivity(calls) ?? input.lastMessageAt;
306
315
  if (settledAt !== undefined) {
307
316
  const elapsedMs = now - settledAt;