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 +25 -11
- package/bridge/ble_bridge.py +334 -306
- package/dist/index.js +160 -28
- package/package.json +21 -1
- package/src/index.ts +159 -27
- package/bridge/__pycache__/ble_bridge.cpython-312.pyc +0 -0
- package/bridge/__pycache__/ble_bridge.cpython-313.pyc +0 -0
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
|
|
20
|
-
sanitization**: both auralizers treat any out-of-range byte as a
|
|
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
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
cadence (one ~33ms note per char,
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
|