bzuccaro 07fea457f1 fix: track in-flight requests by id; handle llama-swap upsert/remove events
llama-swap emits inflight events with operation 'upsert' (a single request,
re-emitted as elapsed_ms updates) and id-only 'remove' events. The decoder
ignored 'upsert' and dropped every id-only remove, so the tracker only ever
reflected the connect-time snapshot and the count got stuck (e.g. at '1').

The tracker now keys in-flight state by request id (snapshot/add replace by
id; remove deletes by id), and the decoder normalizes 'upsert' to 'add' and
extracts the id from bare removes.
2026-08-14 12:08:02 -06:00

llama-watch

A Stream Deck plugin (macOS) that monitors a llama-swap instance.

Actions

  • In-Flight Monitor — per-model color state: OFF / LOADING / IDLE / ACTIVE (pulsing red). Powered by the real-time /api/events SSE feed.
  • GPU Graph — live line chart of a GPU metric (utilization %, VRAM %, temperature, power draw, fan speed) for one GPU or all GPUs, sampled every 5 s.

Pressing either key opens http://<base-url>/ui in your browser.

Install

Double-click the packaged .streamDeckPlugin, or run:

npm install
npm run build
streamdeck validate com.bryce.llamawatch.sdPlugin

Develop

npm run watch   # hot-reload while the Stream Deck app is running
npm test        # unit tests (node:test + tsx)

Configure

Per-key settings: base URL (default http://localhost:9292), optional API key, and the model / GPU / metric to watch. The model and GPU dropdowns are populated live from the instance. Each action instance is independent, so you can place several In-Flight Monitor keys (one per model) and several GPU Graph keys (one per GPU × metric) on the same profile. All keys share a single connection to the configured llama-swap instance, which is re-established automatically if you change the base URL or API key on any key.

Marketplace

Assets are prepared for eventual submission (imgs/plugin/icon.png 256/512, action icons, category icon). The plugin only stores its settings locally; it reads GPU metrics and request status from the user's own llama-swap server and sends nothing elsewhere.

S
Description
No description provided
Readme
446 KiB
Languages
TypeScript 95.2%
HTML 3.3%
JavaScript 1.5%