opencode-rgbify-plugin 0.1.3 → 0.1.5

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.

Potentially problematic release.


This version of opencode-rgbify-plugin might be problematic. Click here for more details.

package/README.md CHANGED
@@ -16,18 +16,20 @@ opencode events ──► src/index.ts (plugin) ──► raw tail ──► lin
16
16
  ```
17
17
 
18
18
  - **`src/index.ts`** — the opencode plugin. Spawns the Python bridge and
19
- forwards each delta's last 8 chars as a newline-delimited line. **No
20
- sanitization**: both auralizers treat any out-of-range byte as a rest, so
21
- raw text is safe. (Sanitization existed for the scrolling-display era, where
19
+ forwards each delta's tail (last `TAIL_CHARS=4` chars) as a newline-delimited
20
+ line. **No sanitization**: both auralizers treat any out-of-range byte as a
21
+ rest, so raw text is safe. (Sanitization existed for the scrolling-display era, where
22
22
  tags in the text would scroll across the matrix; the firmware now blits one
23
23
  char at a time, so tags are harmless — and the old tag-swallowing state
24
24
  machine could stick on an unbalanced `<` and silently discard whole streams.
25
25
  That was the long-standing "auralizers go silent" bug.)
26
- - **`bridge/ble_bridge.py`** — the BLE bridge. Reads lines from stdin, chunks
27
- them to the negotiated MTU, writes them to the projector's `TEXT_BRIDGE`
28
- characteristic, and auralizes each char on the host at the firmware's native
29
- cadence (one ~33ms note per char, log-scale frequency table identical to the
30
- firmware).
26
+ - **`bridge/ble_bridge.py`** — the BLE bridge. Reads lines from stdin and
27
+ writes each to the projector's `TEXT_BRIDGE` characteristic as a
28
+ write-without-response (fire-and-forget, no ACK wait), and auralizes each
29
+ char on the host at the firmware's native cadence (one ~33ms note per char,
30
+ log-scale frequency table identical to the firmware). The plugin feeds stdin
31
+ via a `ReadableStream` with latest-wins semantics, so opencode never blocks
32
+ on the bridge and no line ever queues up.
31
33
 
32
34
  ### Interrupt semantics
33
35
 
@@ -78,9 +80,21 @@ path still works.
78
80
  | `RGBIFY_STATE_DIR` | `~/.config/opencode/state` | Where `host-volume` is persisted |
79
81
  | `RGBIFY_DEBUG_LOG` | — | Append debug log path |
80
82
 
81
- Host volume is mirrored from the projector's `VOLUME` characteristic whenever
82
- it's connected and persisted to `host-volume` so it survives restarts. While
83
- the projector is off you can still adjust the host volume by editing that file.
83
+ Desktop (host) volume is controlled independently of the projector via the
84
+ embedded RGBify volume popup (below) and persisted to `host-volume` so it
85
+ survives restarts. It is **not** mirrored from the projector's `VOLUME`
86
+ characteristic.
87
+
88
+ ### Desktop volume via a slash command
89
+
90
+ Set the local desktop auralizer volume from opencode with `/rgbify volume <0-10>`
91
+ (e.g. `/rgbify volume 7`). No firmware change, no website.
92
+
93
+ - The plugin defines a `rgbify` command (in `opencode.json`'s `command` map) and
94
+ handles it in the `command.execute.before` hook: it writes `host-volume`, and
95
+ the running bridge's `watch_host_volume` task applies it live — even with the
96
+ projector off.
97
+ - `Ctrl+P` → "rgbify" also lists it like any other command.
84
98
 
85
99
  ## Development
86
100