@cesarus777/opencode-cgp 0.3.1 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0 — 2026-10-29
4
+
5
+ - Add a Models screen to the standalone terminal dashboard: aggregate charts and statistics across retained root, child and archived sessions, exact agent filtering, model sorting, time windows, bucket inspection and paginated request details.
6
+ - Add the read-only, location-scoped `context-guard.analytics.v1` RPC with bounded scans, short-lived snapshots and pagination independent of aggregate totals. Older servers preserve existing dashboard screens and report Models as unsupported.
7
+
8
+ - Preserve history graph indentation in the standalone dashboard so axes, gap markers and filled columns stay aligned.
9
+ - Keep all model statistics accessible in narrow terminals, scrolling through wrapped rows before advancing model selection.
10
+ - Clarify that the dashboard can run in a separate terminal while working in OpenCode; closing the native TUI was a test setup condition.
11
+
3
12
  ## 0.3.1 — 2026-10-29
4
13
 
5
14
  - Install the standalone dashboard's pinned OpenTUI renderer automatically with CGP, including its native platform library. Keep renderer loading lazy so server and offline commands still work on Bun >=1.1.34; the dashboard requires Bun >=1.3.0.
package/README.md CHANGED
@@ -107,7 +107,9 @@ Each command's help explains its inputs and shows an example. In a source checko
107
107
 
108
108
  ## Standalone terminal dashboard
109
109
 
110
- Run the dashboard with OpenCode's native TUI closed. The server must already be running, with Context Guard registered in the owning location. The standalone command requires **Bun >=1.3.0**. The package automatically installs **`@opentui/core@0.5.17`** and its platform renderer; no separate OpenTUI install is needed. Keep optional dependencies enabled so OpenTUI's native platform library is installed. Server imports and existing diagnostic commands retain Bun >=1.1.34 support. Solid and the native TUI plugin are unnecessary for this command.
110
+ Run the dashboard in a separate terminal tab, window or pane while continuing to work in OpenCode. Both clients connect to the same running server, with Context Guard registered in the owning location. Launch `context-guard dashboard tui` from the same project directory, or select the server and directory explicitly. Each full-screen TUI needs its own terminal. The standalone command requires **Bun >=1.3.0**. The package automatically installs **`@opentui/core@0.5.17`** and its platform renderer; no separate OpenTUI install is needed. Keep optional dependencies enabled so OpenTUI's native platform library is installed. Server imports and existing diagnostic commands retain Bun >=1.1.34 support. Solid and the native TUI plugin are unnecessary for this command.
111
+
112
+ The dashboard reads live updates without controlling OpenCode's sessions or server lifecycle. Concurrent dashboard/native-client PTYs pass local synthetic-provider validation on OpenCode 2.0.29 and 2.1.2; quitting the dashboard leaves the native client running.
111
113
 
112
114
  For an unreleased checkout:
113
115
 
@@ -127,7 +129,11 @@ bun node_modules/.bin/context-guard dashboard tui
127
129
 
128
130
  Local discovery uses the current directory by default. An explicit server requires an absolute **server-side** `--directory`; it is passed unchanged. Set `CONTEXT_GUARD_PASSWORD` and optional `CONTEXT_GUARD_USERNAME` (default `opencode`) in the environment for remote authentication. Use HTTPS except on loopback. Credentials in URLs are rejected.
129
131
 
130
- Use `1` overview, `2` detail, `3` history, arrows or `j/k` to navigate, `/` to search, `f` for exact agent/model filters, `l` for location, `r` to refresh, and `?` for help. History uses Left/Right for six metrics, `w` for 5m/1h/24h/7d, and `[`/`]` to inspect exact samples or requests. Detail scrolls through full IDs and every exposed snapshot field. Editors take precedence over shortcuts; Enter applies and Escape cancels. Quit with `q` or Ctrl+C.
132
+ Use `1` overview, `2` detail, `3` history, `4` models, arrows or `j/k` to navigate, `/` to search sessions, `f` for exact agent/model filters, `l` for location, `r` to refresh, and `?` for help. History uses Left/Right for six metrics, `w` for 5m/1h/24h/7d, and `[`/`]` to inspect exact samples or requests. Detail scrolls through full IDs and every exposed snapshot field. Editors take precedence over shortcuts; Enter applies and Escape cancels. Quit with `q` or Ctrl+C.
133
+
134
+ For **aggregate statistics and charts for a model**, press **4**, select its full `provider/model` identity and press **Enter**. This combines completed requests from root, child and archived sessions in the owning location; no live session selection is needed. **Left/Right** selects weighted request TPS, TTFT median/p95, completed requests or reported output. **w** selects the time window, **[ / ]** inspects a bucket, **f** filters by agent, **d** toggles request details, and **n/p** pages models or requests. **s** cycles model-list sorting and **Escape** returns to the list. Existing inventory model filters seed model selection; session search does not restrict these aggregates.
135
+
136
+ Models refreshes while visible using the dashboard's 30-second refresh interval; **r** requests a refresh (the server's archive cache lasts up to 30 seconds). Range totals precede pagination and chart reduction. Weighted request TPS divides reported output by summed matched request durations, including TTFT; concurrent durations add, so this measures request performance rather than fleet output per wall-clock second. In-flight requests appear after stream completion, which does not establish task success. TTFT is observed/approximate. Empty or ineligible buckets stay blank and partial coverage remains labeled. See [model analytics](docs/configuration.md#terminal-model-analytics) for server requirements and limits.
131
137
 
132
138
  The location editor's Tab key cycles up to four remembered owning directories; this is not server-wide discovery. History shows bounded retention, partial/downsampled data and gaps. Unknown measurements stay unknown, while stale occupancy remains labeled and pressure becomes unknown. Browser delivery is a later milestone. See [terminal validation and dependency sizes](docs/validation/dashboard-terminal-2026-10-28.md).
133
139
 
@@ -153,7 +159,7 @@ Enabling Context Guard after work has already started also shows the last report
153
159
 
154
160
  Per-session live TPS, average model throughput, average session throughput and observed TTFT appear in the selected session and child rows. Live TPS and TTFT use `~` to mark estimates; completed rates use provider totals. Configurable local history defaults to seven days with a 64 MiB total cap, independently of diagnostic telemetry. See [metric definitions and history exports](docs/configuration.md#live-performance-and-retained-history).
155
161
 
156
- Compare models across retained sessions with `bun run inspect models /absolute/history-directory --model provider/model` (installed: `context-guard models ...`). JSON/CSV summaries include weighted request TPS, TTFT mean/median/p95, eligibility counts and coverage limits. Use `--from`, `--to` and `--agent` to scope the analysis. This offline command precedes the planned TUI Models screen; see [analytics definitions](docs/configuration.md#offline-model-analytics).
162
+ Compare models across retained sessions with `bun run inspect models /absolute/history-directory --model provider/model` (installed: `context-guard models ...`). JSON/CSV summaries include weighted request TPS, TTFT mean/median/p95, eligibility counts and coverage limits. Use `--from`, `--to` and `--agent` to scope the analysis. The standalone dashboard's Models screen shares these definitions; see [analytics definitions](docs/configuration.md#offline-model-analytics).
157
163
 
158
164
  Press **c** in the Context Guard panel for retained-history terminal charts. View one metric at a time with **Left / Right**, change the time window with **[ / ]**, and select an agent instance with **Up / Down**. Press **c** to return or **q** to close the panel; controls stay visible below the scrollable content. Generate a self-contained interactive browser report with `bun run charts /absolute/history-directory --output report.html`. It includes filters, UTC timestamp tooltips, request statistics and SVG export. Installed packages expose the same command as `context-guard charts ...` (Bun required). See [chart controls and limits](docs/configuration.md#performance-charts).
159
165