Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d33f0ad
Add CLAUDE.md with commands, architecture and platform notes
msmayankshetty99 Oct 4, 2026
65238e9
Update CLAUDE.md for the main branch rename
msmayankshetty99 Oct 4, 2026
db15789
Stop publishing events while holding component locks
msmayankshetty99 Oct 4, 2026
23febe5
Keep user data on Stop, failures and unreadable stores; free the even…
msmayankshetty99 Oct 4, 2026
956abdd
Replace the calculator's eval() with a restricted AST evaluator
msmayankshetty99 Oct 5, 2026
793d890
Lock down the local API: per-start token, Host/Origin checks, signed …
msmayankshetty99 Oct 5, 2026
0de0522
Add a llama_server provider for a llama-server the user runs
msmayankshetty99 Oct 5, 2026
e91c2ca
Run on Metal: ASR factory, no FAISS, torch devices, llama.cpp options…
msmayankshetty99 Oct 5, 2026
4f3f6e6
Wave 3, segment 1: packaged first run and shipped-OS fixes
msmayankshetty99 Oct 5, 2026
4742c48
Wave 3, segment 2: pinned dependencies and a release check that prove…
msmayankshetty99 Oct 5, 2026
ea8d044
Wave 3, segment 3: one native-backend manifest, per-OS release builds…
msmayankshetty99 Oct 6, 2026
ac801bf
Wave 3, segment 4: CI on every push and pull request, a green suite, …
msmayankshetty99 Oct 7, 2026
d4066f3
CLAUDE.md: the full suite also passes on the windows-2022 CI leg
msmayankshetty99 Oct 7, 2026
be9d5c3
Merge pull request #1 from msmayankshetty99/wave3-release
msmayankshetty99 Oct 7, 2026
1196c0e
Wave 4, segment 1: context and token budgets
msmayankshetty99 Oct 8, 2026
a91ef6c
Wave 4, segment 2: turn lifecycle and voice
msmayankshetty99 Oct 8, 2026
5860b15
Wave 4, segment 3: Discord and store robustness
msmayankshetty99 Oct 8, 2026
0f2a171
Merge pull request #2 from msmayankshetty99/wave4-turns
msmayankshetty99 Oct 8, 2026
13c43a9
Wave 5, segment 1: an acyclic package graph and the seams later segme…
msmayankshetty99 Oct 8, 2026
773047b
Wave 5, segment 2: a public session surface, one history writer, expl…
msmayankshetty99 Oct 9, 2026
b6f9b4a
Wave 5, segment 3: explicit provider and tool contracts
msmayankshetty99 Oct 9, 2026
ac16092
Wave 5, segment 4: typed audio settings and one settings schema
msmayankshetty99 Oct 9, 2026
d377437
Wave 5, segment 5: data paths, a split desktop state, and an app factory
msmayankshetty99 Oct 9, 2026
e8c3b4b
Wave 5, segment 6: one backend origin, a split main process, schema-d…
msmayankshetty99 Oct 10, 2026
1cdbca8
Fix Windows Discord overrides and a timestamp-dependent asset test
msmayankshetty99 Oct 10, 2026
92a3d3d
Merge pull request #3 from msmayankshetty99/wave5-modularity
msmayankshetty99 Oct 10, 2026
0897b35
Wave 6, segment 1: native packaging hardening and an opt-in ROCm/HIP …
msmayankshetty99 Oct 12, 2026
70fd3c5
Add tools.disabled: keep unused tools out of every prompt
msmayankshetty99 Oct 12, 2026
9de84af
Avatar: never frustum-cull avatar meshes
msmayankshetty99 Oct 12, 2026
421bb46
CLAUDE.md: note tools.disabled
msmayankshetty99 Oct 12, 2026
79e901b
Avatar pickup: restore the root's Euler angles, so a VRM 0.x avatar n…
msmayankshetty99 Oct 12, 2026
6e25e8d
Avatar pickup: default to a gentle sway, with ragdoll opt-in
msmayankshetty99 Oct 12, 2026
b41641c
Avatar: hair, cloth and bust bounce when she is moved; a bouncier hel…
msmayankshetty99 Oct 12, 2026
9d9488f
Avatar: a face that reacts, and procedural poses no longer mirrored o…
msmayankshetty99 Oct 13, 2026
670503d
Avatar: held like a person, not a limp doll: hold scenes, a scruff ha…
msmayankshetty99 Oct 13, 2026
08bc8a8
Avatar: throw her and she falls and lands; eyes that dart; a real-mod…
msmayankshetty99 Oct 14, 2026
1f5f4ec
Wave 6, segment 2: backend-neutral GPU telemetry, a unified-memory es…
msmayankshetty99 Oct 15, 2026
651c50a
Wave 6, segment 3: security hardening (secrets, remote images, CSP, p…
msmayankshetty99 Oct 16, 2026
c86fbe2
Wave 6, segment 4: pinned Julia code, a verified release pipeline, an…
msmayankshetty99 Oct 16, 2026
f433d6c
Merge pull request #4 from msmayankshetty99/wave6-rocm-hardening
msmayankshetty99 Oct 16, 2026
31d455f
UI Phase 0: speed and bug pass
msmayankshetty99 Oct 20, 2026
9cb38fa
Merge pull request #5 from msmayankshetty99/ui-phase0-perf
msmayankshetty99 Oct 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .env.discord.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Discord_allowed_users=
# Explicit server TEXT channel IDs; an empty list disables server interaction.
# DMs are allowed only for configured admins/trusted users.
Discord_Channel_whitelist=234567890123456789
# Only for a client started by hand: Start Discord (Settings or the tray) passes the backend's own address.
Discord_backend_url=http://127.0.0.1:8765
# Optional test server for immediate slash-command synchronization.
Discord_sync_guild=
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Auto detect text files and perform LF normalization
* text=auto
# Shell scripts must keep LF on Windows checkouts, or bash rejects "set -o pipefail\r".
*.sh text eol=lf
42 changes: 42 additions & 0 deletions .github/actions/hip-bundle/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: HIP bundle
description: >-
The opt-in hip bundle (electron/native_backends.json), built by tools/release/build.py --smoke-bundle exactly as a release
builds a bundle, inside the job's rocm/dev-ubuntu-22.04 container, then checked there without a GPU: the rpath that finds
AMD's ROCm, and build.py --check-bundle (the six exports and riko_devices' device list, a CPU module from the bundle,
ggml-hip loading against ROCm 7.2.1). rocm-compile.yml's compile job and release.yml's opt-in hip job both run it, so
the compile job proves the release's recipe; neither runs a model on an AMD GPU.
inputs:
destination:
description: The bundle folder, relative to the workspace and named hip (container jobs see runner.temp under another path)
required: true
runs:
using: composite
steps:
- name: ROCm build dependencies
# The image has ROCm 7.2.1's compilers and Python 3.10, and its apt source is that release's repository, signed by AMD.
shell: bash
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git cmake hipblas-dev rocblas-dev
git config --global --add safe.directory '*'
- name: llama.cpp at the pin
shell: bash
run: |
pin=$(python3 -c "import runpy; print(runpy.run_path('tools/release/build.py')['PIN'])")
git init -q "$RUNNER_TEMP/llama.cpp-hip"
git -C "$RUNNER_TEMP/llama.cpp-hip" remote add origin https://github.com/ggml-org/llama.cpp
git -C "$RUNNER_TEMP/llama.cpp-hip" fetch -q --depth 1 origin "$pin"
git -C "$RUNNER_TEMP/llama.cpp-hip" -c core.autocrlf=false checkout -q --detach FETCH_HEAD
- name: Build the hip bundle
# CMake's HIP language takes ROCm's clang from HIPCXX, as llama.cpp's docs build it; ggml-hip for twelve GPU targets
# is the long part, so every core compiles.
shell: bash
run: |
export HIPCXX="$(/opt/rocm/bin/hipconfig -l)/clang" HIP_PATH="$(/opt/rocm/bin/hipconfig -R)" RIKO_BUILD_JOBS="$(nproc)"
python3 tools/release/build.py --smoke-bundle hip "$RUNNER_TEMP/llama.cpp-hip" "${{ inputs.destination }}"
- name: Check the hip bundle without a GPU
# The manifest's rpath: ggml-hip looks beside itself, then in /opt/rocm/lib, where AMD's packages put libamdhip64.
shell: bash
run: |
readelf -d "${{ inputs.destination }}/libggml-hip.so" | grep -E 'Library (runpath|rpath): \[\$ORIGIN:/opt/rocm/lib\]'
python3 tools/release/build.py --check-bundle "${{ inputs.destination }}/libriko-native.so"
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI
# Every push and pull request: the whole Python suite on each OS a release ships for, and the Electron tests and build.
# Every GPU, audio device and native library is mocked here; .github/workflows/native-smoke.yml loads a real build.
on:
push:
branches: ['**'] # not tags: a v* tag runs the release workflow
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
# A newer push to the same branch or pull request replaces a run still in progress.
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} # a push and its pull request share one run
cancel-in-progress: true
jobs:
python:
name: Python tests (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
# The release workflow's runners: Windows and Linux x64, Apple silicon macOS.
os: [ubuntu-22.04, windows-2022, macos-15]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
defaults:
run:
# bash -eo pipefail stops a step at its first failing command; Windows' default pwsh checks only the last one.
shell: bash
env:
# No Hugging Face downloads: tests/conftest.py already refuses Julia-1's, and this catches any other model.
HF_HUB_OFFLINE: '1'
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
cache: pip
cache-dependency-path: tools/release/requirements-lock*.txt
- name: Linux audio libraries
# sounddevice loads PortAudio when imported (tests/test_release_build.py runs the release check's imports).
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libportaudio2 libsndfile1
- name: Python dependencies
# The release's hash-locked versions (tools/release/lock.py), so CI tests what a release freezes; torch is the CPU build.
run: |
python -m pip install --require-hashes -r tools/release/requirements-lock.txt --extra-index-url https://download.pytorch.org/whl/cpu
python -m pip install --require-hashes --no-deps -r tools/release/requirements-lock-no-deps.txt
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
cache: npm
cache-dependency-path: electron/package-lock.json
- name: Electron packages for the cross-language tests
# tests/test_settings_store.py runs electron/release.cjs's first-run setup in Node and validates what it writes; it
# skips without electron/node_modules. Only the JavaScript packages are needed, not the Electron binary.
working-directory: electron
run: npm ci --ignore-scripts
- name: Python tests
# --timeout (pytest-timeout, in the lock) fails a deadlocked test after 5 minutes instead of hanging the job;
# the whole suite takes well under a minute on a developer machine.
run: python -m pytest -q --timeout=300 -rfEs

electron:
name: Electron tests and build
runs-on: ubuntu-22.04
timeout-minutes: 20
defaults:
run:
working-directory: electron
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
cache: npm
cache-dependency-path: electron/package-lock.json
- run: npm ci
- name: Main and preload syntax
run: |
node --check main.cjs
node --check preload.cjs
- run: npm test
- run: npm run build
120 changes: 120 additions & 0 deletions .github/workflows/native-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Native smoke
# Builds the patched riko-native bridge at the pinned llama.cpp with Metal, as a release does, and runs a small GGUF through
# InProcessLlamaProvider (tests/test_native_smoke.py): the ctypes ABI, slots, streaming, cancellation and the emotion probe.
# Hosted Apple silicon runners have a paravirtual GPU that llama.cpp's Metal backend can use (PyTorch MPS cannot).
# The opt-in ROCm bundle's compile check lives in rocm-compile.yml (manual: twelve GPU targets take hours).
on:
push:
branches: ['**']
paths:
- tools/llama_cpp/**
- Code/process/app_core/inference/**
- Code/process/app_core/kernel/** # messages, streaming, cancellation and timings the providers use
- tools/release/**
- electron/native_backends.json
- Code/process/app_core/emotion/** # FEATURE_VERSION must match tools/llama_cpp/emotion-probe.patch
- Code/process/app_core/configuration/**
- Code/run_server.py
- pyproject.toml
- tests/test_native_smoke.py
- .github/workflows/native-smoke.yml
pull_request:
paths: # the same list as push
- tools/llama_cpp/**
- Code/process/app_core/inference/**
- Code/process/app_core/kernel/** # messages, streaming, cancellation and timings the providers use
- tools/release/**
- electron/native_backends.json
- Code/process/app_core/emotion/** # FEATURE_VERSION must match tools/llama_cpp/emotion-probe.patch
- Code/process/app_core/configuration/**
- Code/run_server.py
- pyproject.toml
- tests/test_native_smoke.py
- .github/workflows/native-smoke.yml
schedule:
- cron: '23 5 * * 1' # weekly (Monday 05:23 UTC): runner images, Xcode and macOS change without a commit here
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} # a push and its pull request share one run
cancel-in-progress: true
jobs:
metal:
name: Metal bridge and model (macos-15 arm64)
runs-on: macos-15
timeout-minutes: 60
defaults:
run:
shell: bash
env:
HF_HUB_OFFLINE: '1'
LLAMA_CPP: ${{ github.workspace }}/.native/llama.cpp-smoke
# Qwen2.5-0.5B-Instruct, Apache-2.0 (LICENSE in the repository at this revision), from Qwen's own GGUF repository.
MODEL_URL: https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/resolve/9217f5db79a29953eb74d5343926648285ec7e67/qwen2.5-0.5b-instruct-q4_k_m.gguf
MODEL_SHA256: 74a4da8c9fdbcd15bd1f6d01d621410d31c6fc00986f5eb687824e7b93d7a9db
MODEL: ${{ github.workspace }}/.native/models/qwen2.5-0.5b-instruct-q4_k_m.gguf
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
cache: pip
cache-dependency-path: tools/release/requirements-lock*.txt
- name: Pinned llama.cpp commit
id: pin
run: echo "commit=$(python -c "import runpy; print(runpy.run_path('tools/release/build.py')['PIN'])")" >> "$GITHUB_OUTPUT"
- name: Restore the llama.cpp checkout
id: llama-cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .native/llama.cpp-smoke
key: llama.cpp-${{ steps.pin.outputs.commit }}
- name: Fetch llama.cpp at the pin
if: steps.llama-cache.outputs.cache-hit != 'true'
run: |
git init -q "$LLAMA_CPP"
git -C "$LLAMA_CPP" remote add origin https://github.com/ggml-org/llama.cpp
git -C "$LLAMA_CPP" fetch --depth 1 origin "${{ steps.pin.outputs.commit }}"
git -C "$LLAMA_CPP" -c core.autocrlf=false checkout -q --detach FETCH_HEAD
- name: Cache the unpatched checkout
# Saved before the patch and the build, so every run patches the pin afresh; build.py refuses any other commit.
if: steps.llama-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .native/llama.cpp-smoke
key: llama.cpp-${{ steps.pin.outputs.commit }}
- name: Build the Metal bundle
# The release's patch, CMake flags (@loader_path rpath, embedded Metal library) and library copying.
run: python tools/release/build.py --smoke-bundle metal "$LLAMA_CPP" "$RUNNER_TEMP/native/metal"
- name: Restore the model
id: model-cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .native/models
key: gguf-${{ env.MODEL_SHA256 }}
- name: Download the model
if: steps.model-cache.outputs.cache-hit != 'true'
run: |
mkdir -p "$(dirname "$MODEL")"
curl --fail --location --retry 3 --output "$MODEL" "$MODEL_URL"
- name: Verify the model
run: echo "$MODEL_SHA256 $MODEL" | shasum -a 256 -c -
- name: Cache the model
# Once verified, and whether or not the tests below pass.
if: steps.model-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .native/models
key: gguf-${{ env.MODEL_SHA256 }}
- name: Python dependencies
run: |
python -m pip install --require-hashes -r tools/release/requirements-lock.txt --extra-index-url https://download.pytorch.org/whl/cpu
python -m pip install --require-hashes --no-deps -r tools/release/requirements-lock-no-deps.txt
- name: Native tests
env:
RIKO_TEST_NATIVE_LIBRARY: ${{ runner.temp }}/native/metal/libriko-native.dylib
RIKO_TEST_GGUF: ${{ env.MODEL }}
RIKO_TEST_EXPECT_GPU: '1'
RIKO_TEST_EXPECT_DEVICES: '1' # the bridge built here has riko_devices
run: python -m pytest -m native -v -rs --timeout=600 tests/test_native_smoke.py
Loading
Loading