Skip to content

Skill v0.1.3

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 23:50
· 6 commits to main since this release

Changelog

Features

  • Raspberry Pi: the app runs on a 64-bit Raspberry Pi 4 or 5 with Raspberry Pi OS Bookworm or Trixie (aarch64 .deb/.rpm from the Trial — Linux arm64 packages workflow; install and LLM chat verified on a Pi 5). On a Pi, auto inference runs every model on the CPU: the VideoCore GPU shows up as a wgpu adapter but is slower, too small for model weights, and has given wrong output. Choosing wgpu explicitly still tries it; SKILL_ACCEL_RASPBERRY_PI=0|1 overrides detection. See docs/RASPBERRY_PI.md.

  • LLM on the CPU uses ~4 GB less memory: Qwen3.5 token embeddings are looked up outside the compiled graphs whenever the model runs on the CPU (RLX_QWEN35_HOST_EMBED=1, set automatically unless already set). Each compiled graph used to hold its own 1 GB float copy of the table: Qwen3.5-0.8B peaked at 7.0 GB instead of 3.0 GB at a Pi's cache budget, with byte-identical output.

  • Session trace: every recording reports once a second what it costs and whether all of it arrives — sample rate, ingest lag, breaks in the time stamps (dropped samples), pipeline CPU, bytes written, failed writes, epochs sent to and dropped by the embedder, daemon CPU and peak memory. Sent as a SessionTrace event, logged once a minute (at once when storage fails), and kept under trace in the recording's sidecar JSON.

  • Parquet recordings survive a crash: after every row group the raw EEG file is synced and its footer checkpointed (.parquet.ckpt), and rows not yet in a row group go to a small journal (.parquet.tail). A recording left without its footer by a crash, a kill or a power cut is rebuilt the next time a recording starts. Both side files are removed on a clean close.

  • LSL streams are stamped on this machine's clock: EEG samples and markers are mapped to this computer's Unix time through LSL clock synchronisation (the outlet's time service, re-measured every few seconds), so a source on another computer — whose wall clock may differ from ours — is recorded on the same timeline as markers and labels. When the time service does not answer, a stream's declared wall-clock reference (<clock_reference>, as the nesdk-lsl bridge writes) is used, else its arrival time. Previously LSL recordings carried the sender's process clock.

  • Automatic recording format: new auto storage format, now the default for new installs: CSV for small streams, Parquet once a stream reaches 4 096 values per second (channels × sample rate), e.g. 16 channels at 256 Hz. Existing settings are kept as they are.

  • LSL markers: during an LSL session every marker stream on the network (type Markers, text or numeric, including ones that start later) is followed. The network is searched for new marker streams about once a second: a stream that appears during a session is joined within about 1.5 s, and what it sends before that is lost (LSL does not replay). Each marker is written to the recording's new _markers.csv sidecar with its sub-second Unix time, broadcast as a Marker event, exported to BIDS as a marker event, and stored as a label when it differs from the previous marker of its stream (a repeated trigger becomes one label a minute, not one per repetition).

  • Lossless recording (setting, off by default): Settings → Recording Format → Lossless recording, or POST /v1/settings/lossless-recording. Samples, markers and sensor data that arrive while the recording cannot be opened (disk full, directory missing) are held in memory — up to 128 MB, a quarter of an hour of 32 channels at 500 Hz — and written in order once it opens; and when a session is cancelled, what the device has already delivered is written before the session closes instead of being discarded. Data written late is recorded but not analysed.

  • Integer sources are recorded as integers: an LSL stream of integers (int8…int64, e.g. nesdk-lsl --int: the amplifier's own nanovolt counts) is stored in the Parquet recording as int64 counts with delta encoding, with the microvolts one count stands for in the file metadata (skill.eeg_scale_uv). Exact, and less than half the size: an hour of a 32-channel 500 Hz amplifier is 163 MB instead of 357 MB as f64. Readers (read_eeg_parquet, BIDS export, re-embedding) get microvolts as before; crash recovery keeps the form. Other adapters can opt in through DeviceAdapter::eeg_scale_uv.

  • LSL units are honoured: a stream that declares its channels in nanovolts, millivolts or volts is converted to the microvolts the pipeline works in (it used to be taken as microvolts whatever it said). Streams without a unit, or with one that is not a voltage, are unchanged.

  • Clock check while recording (setting, on by default): every five minutes during a session this computer's clock is compared with a time server (SNTP; by default the server the operating system's own clock service uses — time.apple.com, time.windows.com, pool.ntp.org). The difference is never applied to the clock or to the time stamps: it is reported (ClockCheck event, clock_offset_ms / clock_uncertainty_ms in the session trace), kept beside the recording in exg_<ts>_clock.csv, and a clock more than 50 ms out raises a warning. skill_data::wall_clock::ClockCorrection fits a recording's checks (offset and drift, weighted by network round trip) to correct time stamps afterwards, and the BIDS export states the measured offset in the EEG sidecar (ClockOffsetSeconds, ClockDriftPPM, ClockChecks) and gives acq_time on the server's clock (correctClock: false leaves it). Settings → Recording Format → Check the clock while recording, or /v1/settings/time-check (enabled, server, interval_minutes, warn_ms). A lab with its own time server on the local network — or PTP-disciplined machines — names it in server and gets sub-millisecond agreement between its computers; over the internet a check is good to a few milliseconds.

  • LSL accelerometer readings carry their own time: the accelerometer stream beside an EEG stream is put on this computer's clock like the EEG (it used to be stamped with the moment each reading arrived). ImuFrame gained an optional timestamp_s for sources that stamp their readings.

  • Companion devices (setting, off by default): a second device recorded in parallel with every session, into the same recording and on the same clock — Settings → Recording Format → Record an EmotiBit alongside, or any connect targets through POST /v1/settings/companion-devices (["emotibit"], ["emotibit:192.168.1.40"]). The session stays its own device's: a companion's vitals, sensor streams and markers go to the _vitals, _sensors and _markers files, its motion and battery become sensor channels (accel_x … battery_pct), and its EEG / PPG / fNIRS frames are not recorded. A companion that is missing does not hold a session up and one that drops out does not end it: it is looked for again every five seconds, and every connection and loss is recorded as a marker (emotibit connected / emotibit disconnected, source companion).

  • Montages — by default and after the fact: a recording's channels can be given labels, a kind each (EEG, EOG, ECG, EMG, reference, trigger, other), bad-channel marks, positions, a reference and a ground.

    • By default: Settings → Recording Format → Montages… keeps a library of named montages and makes one the default for sessions by device name (EN32*), device kind and channel count. Such a session records and analyses under the montage's labels; what the device called its channels is kept beside the recording.
    • After the fact: History → a session → Montage gives any recording a montage, replaces it or removes it. Nothing recorded is rewritten: the montage is a file of its own beside the recording (exg_<ts>.montage) and is laid over it when it is read; BIDS export writes its labels, channel types, bad channels, reference and ground.
    • Written however is at hand: labels in channel order (Fp1 Fp2 F7 …), single channels (CH3=Cz, CH32=HEOG:eog, CH7=T7! for a bad one), a JSON list, a {recorded name or number: label} map, a montage written out in full, or the name of a saved one. A montage may cover only some channels and may name channels a recording does not have; what does not fit comes back as warnings, not as an error.
    • API: GET/POST /v1/settings/montages, POST /v1/settings/montages/save ({name, montage, defaultFor?}), …/delete, …/preview (lay a montage over channels without saving), GET /v1/history/sessions/montage?csvPath=, POST /v1/history/sessions/montage ({csvPath, montage | null}).
  • LSL accelerometer: the <name>-Accelerometer stream a source publishes beside <name>-EEG is recorded as IMU data (mm/s² converted to g).

Performance

  • Faster prompt processing on the CPU: rlx-models now compiles CPU prefill graphs from a 32-token minimum instead of 256. CPU prefill cost follows the compiled width rather than the prompt, so a short chat prompt paid for 256 tokens. On a Raspberry Pi 5 (Qwen3.5-0.8B, ~22-token prompts, through the daemon) prompts took 3.1 / 5.6 / 5.6 s instead of 12 / 45 / 50 s, with identical output. GPU backends keep the 256 minimum.

  • Smaller Parquet recordings: raw EEG is written in row groups of 10 s of signal (sized from the stream's own rate, no longer one per 256 samples) with byte-stream-split encoding and ZSTD — about 2.6× smaller than before and 3× smaller than CSV on a 500 Hz test signal.

  • Band-metrics Parquet file 15× smaller: _metrics.parquet was cut into a new row group on every flush — twice a second — and with twelve columns per channel (432 for 32 channels) nearly all of the file was per-column headers: about 700 MB an hour for a 32-channel stream. Row groups are now a minute of metrics, encoded with byte-stream-split and ZSTD and without per-column statistics. Values are unchanged.

  • Whole-frame recording path: sources that deliver complete frames are written and queued for embedding without per-electrode buffering.

Bugfixes

  • EEG FFT on a Raspberry Pi: auto no longer probes or calibrates the GPU FFT on a Pi, where the VideoCore's 256-invocation workgroup limit made it panic at startup (caught, but logged and competing with the LLM for the four cores).

  • Bluetooth warnings on Linux say what is wrong: with no usable Bluetooth the daemon warned "not authorised … needs NSBluetoothAlwaysUsageDescription in its Info.plist" (webbluetooth's Apple wording) every 5 s. On Linux it now says bluetoothd is not reachable over D-Bus (install bluez, enable the service) or that there is no Bluetooth adapter (on a Raspberry Pi, a disable-bt overlay), and warns once per reason instead of on every retry (~17 000 identical lines a day). Verified on a Pi 5 in both states.

  • Clippy 1.100: index loops rewritten as iterators (needless_range_loop) in the CSV and Parquet session writers, the Iroh remote PPG decoder and the NeuroRVQ epoch encoder, and a needless_bool in the tool-call filter; no behaviour change. zero_gpu_layers_does_not_veto_an_explicit_accelerator now checks against the shared device policy, so it holds on machines with no accelerator (a Raspberry Pi).

  • A recording that cannot be opened is retried: when the recording could not be created (disk full, directory missing) the session used to run on while silently discarding every sample. It now raises an error toast and retries every 5 s until storage works.

  • Parquet crash recovery could lose every row group of a small stream: the checkpoint that makes a row group recoverable was written before the writer's own buffer had been flushed, so a row group whose last pages were small (few channels, a low rate, well-compressing data) was not entirely in the file when the checkpoint vouched for it — after a crash recovery then fell back to the journal alone. The buffer is now flushed before the sync.

  • LSL time stamps drifted from the wall clock over long recordings: the difference between the LSL clock (monotonic) and Unix time (disciplined against a time server) was measured once when a stream was opened. The two run at slightly different rates — in a one-hour recording markers ended up 54 ms from the time they were sent. The difference is now re-measured every 5 s and followed smoothly (at most 500 ppm), so samples stay evenly spaced while they and the markers keep to the wall clock.

  • Failed writes are counted: CSV and Parquet write errors were ignored; they are now counted, logged and raise a toast.

  • LSL: a restarted sender was sometimes never found again. A device's streams share one source id (its EEG and its accelerometer), and the search for the restarted stream took the first answer — the accelerometer's as often as not — so the session sat beside a stream that was back until the idle timeout ended it. The stream is now looked for by source id and name. A restart is noted (marker source restarted, counted in the trace) whichever way the connection came back, and the new sender is asked for what it sent in the meantime.

  • LSL: time stamps ran ahead on a slow link. With 400 ms between a sender and this machine, a recording's time stamps drifted up to 92 ms ahead and stayed off for a minute after the link was normal again (rlsl ≤ 0.1.1 reads the answer to a time query against the query sent last, not the one it answers). The sender's clock is now measured by skill itself, every answer matched to its own query, slow exchanges not believed, and the offset moved no faster than clocks drift.

  • LSL: the idle timeout setting had no effect. The session runner ended every silent session after a fixed 30 s. An LSL session is now ended after what the LSL tab says (and never, when that is off); the default is 2 minutes instead of 15 s, so that a sender that is restarted or cut off for a while is back in the same session.

Refactor

  • 3D views drawn by threers instead of three.js: the electrode head (onboarding, dashboard, Help → Electrodes), the search graph and the UMAP viewer now render with threers, a Rust renderer on wgpu, compiled to WebAssembly in the new crates/skill-viz3d — WebGPU where the web view has it, WebGL2 otherwise. They look and behave as before: checked side by side against the three.js versions in Chromium and WebKit, including picking, hover, the camera fly-to, the chronological trace and PNG export. The electrode head's placement on the scalp (casting from the cranium centre, falling back to the closest point), the Muse band and hit-testing moved into Rust with it, and the Muse band now shows over the scalp instead of mostly sinking under it.
  • three, @types/three, @threlte/core and @threlte/extras are gone from the frontend dependencies, with the two unused Threlte UMAP components (UmapCanvas, UmapScene).

Build

  • npm run bump no longer prints the whole dependency graph: its Cargo.lock refresh runs cargo metadata only for the lockfile update, but inherited stdout and dumped several MB of JSON into the terminal. stdout is now discarded; cargo's progress and errors (stderr) still show.

  • Faster Rust CI: the Linux Rust job spent ~62 of its 66 minutes compiling and 24 s running tests. Clippy and tests now run as parallel jobs (Rust — clippy, Rust — test), each with its own kache store. Unit and integration tests run in one cargo invocation per crate selection, so shared dependencies are no longer rebuilt for a second step that selected a different crate set. kache now caches C/C++ (cache-c-cpp): DuckDB's bundled C++ — built by the libduckdb-sys build script, ~10 min each, six times per run — was the largest cost and was never cached (73% of crates hit but only 23% of compile cost).

  • npm audit clean: all 7 low-severity warnings came from deepmerge 4.3.1 (GHSA-gcqx-w48m-w2h4, prototype poisoning through an own __proto__ key merged into a null-prototype target), pulled in by @sveltejs/vite-plugin-svelte. No patched release exists, and npm's suggested --force fix would have downgraded SvelteKit to 0.0.30. deepmerge is now overridden with patches/npm/deepmerge-4.3.1: upstream 4.3.1 plus a __proto__ guard in mergeObject, with identical output on ordinary merges. Remove it once upstream ships a fix.

  • npm dependencies updated within their ranges (Biome 2.6.8, SvelteKit 3.2.0, Vite 8.3.8, Tailwind 4.3.5, bits-ui 2.21.0, maplibre-gl 6.18.0, marked 18.2.0, …); biome.json schema bumped to match. allowScripts now names esbuild@0.28.2, so its postinstall runs again after the update.

  • Linux release setup recovers from a bad apt install instead of only reporting it: the cached install is now non-fatal, pkg-config decides whether glib, GTK, libsoup and WebKit are really present, and if not they are installed directly with up to three retries. The step fails, with a clear message, only if that also fails. The package list now lives in one file shared by both paths.

  • macOS DuckDB link fix applies again: the vendored libduckdb-sys patch (-bundle on the static-extension autoregister archive, the fix for the v0.1.0-rc.4 "not 8-byte aligned" link failure and the unable to open object file warnings) had stopped applying when duckdb moved to 1.20000.2 — Cargo reported it as an unused patch. Re-vendored as patches/libduckdb-sys-1.20000.2; upstream moved the link line into build.rs, so the change is now in one place.

  • Release bump preflight passes again: Cargo's new unused_dependencies lint printed 25 manifest warnings, which npm run bump treats as fatal. Unused dependencies removed; dependencies used only behind a feature (axum, async-stream, anyhow, hf-hub, serde_json, tokio) made optional under that feature; llmfit-core limited to non-macOS targets; test-only dependencies moved to [dev-dependencies]; src-tauri takes the workspace rustls; the iroh crates inherit the workspace lints.

  • CI: the integration-test step no longer errors on test targets with required-features (skill-eeg's fft_* need slow-tests), and the release-notes / test-target scripts type-check under svelte-check.

  • Advisory ignores pruned: 23 entries in .cargo/audit.toml and one in deny.toml matched nothing — crates gone from the graph, fixed by upgrades, or (the gtk-rs GTK3 set) withdrawn by RustSec on 2026-08-14 — and a dead ignore hides a future advisory with the same ID. cargo-deny's advisory-not-detected warning is gone.

  • npm run release -- --stable ships the bare version (0.1.2, not 0.1.2-rc.2) instead of promoting an RC build that keeps its -rc.N version. Run 1 merges every RC's notes into one fragment, bumps to the bare version, pushes and tags so CI builds a normal release. Run 2, once the builds pass, rebase-merges the PR. It is a fresh build of the same commit, not the exact bytes tested as the RC.

  • Releases are checked against what is published, not what the clone last saw: npm run release -- --rc now fetches first and refuses, with the fix, to cut an RC on a version that already shipped, to reuse an existing tag, to branch from a local main behind origin/main, or to use a release branch whose upstream is not origin/<branch>. From main with a shipped version it starts the next patch by itself, and it passes the chosen version to bump explicitly.

  • npm run bump can be interrupted safely: Ctrl-C reverts the bump and exits 130 (it used to leave a half-applied bump), and a failed bump now restores only the files it changed instead of running git checkout -- ., so your own uncommitted edits are no longer thrown away.

  • npm run tag explains itself and is safe to repeat: it reports a tag that exists on another commit or on a remote instead of exiting silently, checks every remote before changing anything, never moves a published tag, and pushes a tag that already sits on HEAD.

  • npm run check:test-targets fails if a test file in a crate with autotests = false is not registered in tests/it.rs or as a [[test]], which would otherwise be skipped silently. It also runs in the bump preflight.

  • npm run check:cross type-checks the Windows daemon and app through cargo-xwin, so a break that only shows off macOS (like the sysinfo 0.40 change in skill-gpu) is found before tagging. release --rc/--stable --cross-check runs it first.

  • npm run clean:rust:debug wipes target/debug and tmp and reports the space reclaimed (--dry-run, --rebuild), since stale build generations otherwise grow it to about 17 GB.

  • Linux packages built in a Debian container: scripts/build-linux-container.sh builds the app, daemon and tty, and the .deb/.rpm, inside debian:bookworm, so the binaries need glibc 2.35 at most (they needed 2.39 when built on the Ubuntu 24.04 runner, which Raspberry Pi OS Bookworm cannot run) and the .deb Depends name versions Bookworm has. It also runs rlx's ISA portability scan with symbols kept (the release link with mold otherwise drops the whole symbol table) and starts the daemon under an emulated Cortex-A72 and A76.

  • Linux arm64 trial: builds through that script (full app by default, os: bookworm|trixie), gates the glibc floor, and installs the .deb into debian:bookworm and debian:trixie arm64 containers to check its dependencies and shared libraries resolve and the daemon starts.

  • rpm spec: backticks in a comment inside the spec heredoc were run as shell commands by package-linux-system-bundles.sh (Requires:: command not found); now quoted.

  • npm run build:viz3d rebuilds the 3D views' WebAssembly (scripts/build-viz3d.sh: wasm32-unknown-unknown, wasm-bindgen-cli at the crate's exact version, wasm-opt when installed) into src/lib/viz3d/pkg/, which is committed so frontend builds and CI need no Rust toolchain. Rebuild it after changing crates/skill-viz3d; that crate is its own workspace, so the Rust CI jobs do not compile threers. cargo test in the crate renders each view headless and checks electrode placement and picking.

  • The app's CSP allows 'wasm-unsafe-eval' in script-src, which WebAssembly needs to compile (it does not allow eval). Without it the 3D views show "3D view unavailable".

Dependencies

  • rlx → f6575a59, rlx-models → 7935c8e4 (CPU prefill floor above).

  • bids-rs 0.0.6 from crates.io: the BIDS export crates (bids-core, bids-io, bids-eeg, bids-validate, bids-layout) now come from crates.io at 0.0.6 instead of the bids-rs git main branch (0.0.4), so builds no longer depend on that branch. 0.0.6 adds no new audit findings (0.0.5 would have brought in rsa and an old rustls-webpki); bids-schema now uses rustls-graviola for TLS. Export behaviour is unchanged.

  • jiff 1.0, rusqlite 0.43, jsonschema 0.61: skill-time moves to jiff 1.0 (the Zoned → ZonedDateTime rename stays inside that crate); rusqlite 0.43 brings a newer bundled SQLite for the legacy-store readers; jsonschema 0.61 for tool-argument validation. jiff 0.2 stays in the lock through env_logger.

  • Frontend: @sveltejs/kit 3.3.1, @tauri-apps/api and @tauri-apps/cli 2.12.5, maplibre-gl 6.19, marked 18.2.1.

  • rlsl and rlsl-iroh → 0.1.2. The two LSL fixes above are now also made upstream: rlsl's own time_correction() matches each answer to the query it echoes, and a lost stream is looked for by source id and name. DNS-SD discovery (rlsl's new mdns feature) is not enabled.

  • chrono → jiff, behind the new skill-time crate: skill's own code no longer uses chrono. Every clock read, time-zone lookup and date parse now goes through crates/skill-time, the only crate that names the date library, so a future swap is a change there alone. Behaviour is unchanged: the date tool, the weekly digest and daily brain report schedules, the validation "disable today" midnight, Oura date parsing and terminal-log names give the same results. Days whose midnight is skipped by a DST change now start at the end of the gap; before, the weekly digest and daily report used 0. chrono is still in the lock through Arrow and Parquet (via DuckDB), emotibit, antneuro and, on Windows only, wmi, so RUSTSEC-2026-0543 (chrono unmaintained) still applies until those move.

  • rlsl / rlsl-iroh 0.0.6 → 0.1.1 (from crates.io), which bring:

    • A reader that fell behind lost its stream. rlsl took its buffer length as 360 samples instead of 360 seconds and ended the feed of a consumer that fell further behind — 0.7 s at 500 Hz. A session that stalls for seconds (a slow disk, a long analysis step) now finds the whole stream waiting.
    • Compressed LSL feeds. The LSL adapter asks sources on other computers for a compressed feed (stream-zstd, about 70 % of the bytes on the network for an EEG stream); sources that cannot give one, and sources on this machine, send the plain protocol as before. SKILL_LSL_COMPRESSION=1 / 0 forces it on or off.
    • Streams that answered over IPv6 first. Resolved LSL streams always carry the IPv4 address they answered from (an IPv6-first reply used to leave a stream unreachable), and inlets connect to that address first.

Contributors

  • Eugene Hauptmann
  • github-actions[bot]