Demos
The repo’s scripts/ folder ships demo scripts that exercise the sideband protocol. Run any of them inside a τ-mux pane:
bun scripts/demo_draw.ts # mouse-driven SVG drawingpython3 scripts/demo_dashboard.py # CPU + memory + clock panelspython3 scripts/demo_chart.py # matplotlib SVG chartpython3 scripts/demo_interactive.py # clickable HTML buttonspython3 scripts/demo_image.py photo.png # image panelbun scripts/demo_3d.ts # WebGL 3D demobun scripts/demo_canvas_life.ts # Conway's Game of Lifebash scripts/test_sideband.sh # protocol integration checkWhat each demo shows
Section titled “What each demo shows”| Demo | Highlights |
|---|---|
demo_draw.ts | interactive HTML panels, mouse events, update with new SVG content. |
demo_dashboard.py | Multiple float panels updating at 1 Hz with update. |
demo_chart.py | Matplotlib → SVG → show_svg. Demonstrates inline data instead of byteLength. |
demo_interactive.py | Buttons in HTML panels; click events drive Python state. |
demo_image.py | Single image panel from disk; demonstrates show_image with a path. |
demo_3d.ts | Off-screen WebGL render → image bytes → showCanvas2d. |
demo_canvas_life.ts | High-frequency update calls; demonstrates backpressure under load. |
test_sideband.sh | Smoke test: launches a script, checks every panel type renders. |
Reading order if you’re new
Section titled “Reading order if you’re new”demo_image.py— the simplest possible panel.demo_dashboard.py— multiple panels, periodic updates.demo_interactive.py— events flowing from terminal to script.demo_draw.ts— full bidirectional flow.demo_3d.ts— heavy binary payloads.
Outside τ-mux
Section titled “Outside τ-mux”Every demo also runs in a regular terminal. The client libraries are no-ops, so you’ll get textual output but no panels — useful for testing logic separately from rendering.