Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
2f4691d
feat(backend): add embeddings support with llama-go
juligasa Feb 5, 2026
bb1f5d9
fix(daemon): make cmake visible for please
juligasa Feb 3, 2026
2b77a32
download cmake if not present
juligasa Feb 3, 2026
1a3954b
let mise handle all cmake's shit
juligasa Feb 3, 2026
5dbca8e
explicit c++17
juligasa Feb 4, 2026
ef56247
fix(daemon): macos linker
juligasa Feb 4, 2026
1916c53
fix(daemon): not using omp in macos
juligasa Feb 4, 2026
a437b26
fix(daemon): accelerated framework macos
juligasa Feb 4, 2026
5212781
fix(daemon): not build Blas accelerator on CPU
juligasa Feb 4, 2026
13ec52b
fix(dev): use pnpm and add GPU/llama-go support to dev script
juligasa Feb 5, 2026
630f630
fix(build): use pnpm build rules instead of yarn
juligasa Feb 5, 2026
0aab001
fix(mise): use pnpm instead of yarn in mise.toml
juligasa Feb 5, 2026
7ae3c0e
feat(daemon): filters in semantic search
juligasa Feb 5, 2026
01271f1
fix(daemon): remove semantic dedup as its slow
juligasa Feb 5, 2026
df8ede0
fix(daemon): add search pagination
juligasa Feb 5, 2026
bf22fa1
feat(ci): add llama.cpp build support to CI workflows and fix Docker …
juligasa Feb 5, 2026
38bd2f1
ci: add temporary build test workflow
juligasa Feb 5, 2026
da89e7b
fix(daemon): idempotent migration
juligasa Feb 5, 2026
84be3df
fix(daemon): embeddigs task feedback
juligasa Feb 5, 2026
4d4a1b2
wip(frontend): activate embeddings
juligasa Feb 5, 2026
e8a3e07
wip(daemon): check linux/mac compilation
juligasa Feb 5, 2026
5b32774
fix(daemon): real feedback on embeddings
juligasa Feb 5, 2026
3b74b72
fix(ci): compile metal in macos
juligasa Feb 5, 2026
5b73d5d
fix(ci): compile nwer macos and windows
juligasa Feb 6, 2026
9ca2061
wip(ci): attempt to fix macos/win
juligasa Feb 6, 2026
1f5ade7
fix(ci): macos build
juligasa Feb 6, 2026
8454f50
fix(ci): windows gpu support
juligasa Feb 6, 2026
13ea324
fiix(ci): debug windows
juligasa Feb 6, 2026
69551c2
fix(ci): attempt to fix windows
juligasa Feb 6, 2026
d316aed
attempt 2 to fix windows
juligasa Feb 6, 2026
036301c
attempt 3 to fix windows
juligasa Feb 6, 2026
d63267d
attempt 4 to fix windows
juligasa Feb 6, 2026
ea4ddee
attempt 5 to fix windows
juligasa Feb 6, 2026
20d351b
attempt 6 to fix windows
juligasa Feb 6, 2026
db45713
attempt 7 to fix windows
juligasa Feb 6, 2026
4c7abee
attempt 8 to fix windows
juligasa Feb 6, 2026
e09aec7
fix(daemon): Return correct versions in search
juligasa Feb 6, 2026
a829ad0
fix(daemon): deterministic hybrid order
juligasa Feb 6, 2026
4a8be47
fix(ci): make all workflows compile with gpu
juligasa Feb 6, 2026
07b9bbe
fix(daemon): search bug
juligasa Feb 6, 2026
3229855
fix(daemon): authority score 🥚
juligasa Feb 6, 2026
4660d68
wip(daemon): make gpu by default
juligasa Feb 9, 2026
73d4e47
fix(daemon): granite model bc of weird single words old model
juligasa Feb 9, 2026
73b7a16
wip(daemon): compile gpu everywhere
juligasa Feb 9, 2026
f2b82d4
fix(daemon): remove the reranking downloading
juligasa Feb 9, 2026
3b343fd
fix(ci): get back the build test
juligasa Feb 9, 2026
d3a491d
fix(ci): prepare image for production
juligasa Feb 10, 2026
40dbaf8
fix(daemon): semantic filtering
juligasa Feb 10, 2026
61512c0
wip(daemon): add deprecation notices
juligasa Feb 10, 2026
62f5b1b
fix(ci): build test binaries
juligasa Feb 10, 2026
fc61480
fix(ci): windows package
juligasa Feb 10, 2026
3a9832d
fix(ci): win semver test
juligasa Feb 10, 2026
2b5fc3c
fix(ci): MinGW static linking Windows
juligasa Feb 10, 2026
4d0d3cf
wip(daemon): not using windows dlls
juligasa Feb 10, 2026
eb31dc1
fix(ci): removing windows dlls
juligasa Feb 10, 2026
3c1d570
fix(ci): static OpenMP
juligasa Feb 10, 2026
4435c61
fix(ci): no lgomp
juligasa Feb 10, 2026
d80af20
fix(ci): Windows dance
juligasa Feb 10, 2026
f864cf9
wip(ci): manually add missing deps
juligasa Feb 11, 2026
42cc0cd
fix(ci): not using MinGW to build windows
juligasa Feb 11, 2026
0cca5b4
fix(ci): not using MinGW to build windows v2
juligasa Feb 11, 2026
cb5c44e
fix(ci): not using MinGW to build windows v3
juligasa Feb 11, 2026
ba6e8be
wip(ci): compile sqlite differntly in windows
juligasa Feb 11, 2026
35685a8
wip(ci): compile sqlite differntly in windows v2
juligasa Feb 11, 2026
6f28d13
mingw is back
juligasa Feb 11, 2026
158cdd5
include dlls in win bundle
juligasa Feb 11, 2026
740191d
bundle test build as in prod
juligasa Feb 11, 2026
758769c
fix(daemon): indludeBody searches comments
juligasa Feb 11, 2026
aabebef
fix(ci): test like in prod
juligasa Feb 11, 2026
a781f12
fix(ci): mingw win compilation everywhere
juligasa Feb 11, 2026
7335706
refactor(backend): migrate llama-go from vendored copy to git submodule
juligasa Feb 13, 2026
df2c14d
fix(backend): improve dev setup for fresh clones
juligasa Feb 13, 2026
209a31d
fix(backend): build llama-cpp in-place instead of copying to sandbox
juligasa Feb 13, 2026
54e48fb
refactor(backend): remove CPU/GPU toggle, use platform-native GPU per OS
juligasa Feb 16, 2026
82039ce
fix(backend): exclude llama.cpp submodule from seed-daemon glob
juligasa Feb 16, 2026
90fc53a
fix(dev): use go build directly instead of plz for seed-daemon
juligasa Feb 16, 2026
66f7b51
Revert "fix(dev): use go build directly instead of plz for seed-daemon"
juligasa Feb 16, 2026
c8781e9
fix(backend): add missing libggml-blas.a to llama-cpp genrule and rem…
juligasa Feb 16, 2026
1f882ae
chore: update llama-go submodule (gitignore build artifacts)
juligasa Feb 16, 2026
5aea289
fix(ci): add llama.cpp build and GGUF model to integration-tests job
juligasa Feb 17, 2026
8e6ba0e
fix(backend): fix race condition in embedding indexing test
juligasa Feb 17, 2026
72621a5
fix(ci): move GGUF model and DLL verification steps to real workflows…
juligasa Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,22 @@ grep -qxF "$PATTERN" "$EXCLUDE_FILE" || echo "$PATTERN" >> "$EXCLUDE_FILE"
# Needed for the Go extension in VS Code to find the right toolchain.
export GOROOT="$(go env GOROOT)"

# Ensure git submodules are initialized, embedding model is downloaded,
# and llama.cpp libraries are built. These are idempotent (skip if already done).
mise run ensure-llama-libs
mise run ensure-model

# CGO flags for llama.cpp - use source directory where mise builds the libraries.
export LIBRARY_PATH="$WORKSPACE/backend/util/llama-go"
export C_INCLUDE_PATH="$WORKSPACE/backend/util/llama-go"

# These variables are defined in a separate file to avoid having to invoke direnv allow
# every time we change them. The file doesn't allow any scripting for security, only variables.
dotenv .env.vars

# Optional loading of local env vars.
dotenv_if_exists .env.local

# GPU acceleration is platform-dependent:
# - macOS: Metal (always enabled, via backend/util/llama-go/zgpu_darwin.go)
# - Linux: CPU-only for local dev (Vulkan used in CI/production only)
68 changes: 67 additions & 1 deletion .github/actions/ci-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,79 @@ runs:
sudo apt-get install -y gcc-12 g++-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf rpm libc6 python3 build-essential sqlite3 libsqlite3-dev flatpak flatpak-builder elfutils libnss3 libnspr4 libasound2t64 libnotify4 libpcre3 libpulse0 libxss1 libxtst6 squashfs-tools
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf rpm libc6 python3 build-essential sqlite3 libsqlite3-dev flatpak flatpak-builder elfutils libnss3 libnspr4 libasound2t64 libnotify4 libpcre3 libpulse0 libxss1 libxtst6 squashfs-tools cmake libgomp1
# Snap-related packages temporarily disabled - focusing on flatpak
# sudo apt-get install -y snapd
# sudo snap install snapcraft --classic --channel=7.x/stable
# sudo snap install multipass
shell: bash

- name: "Install Vulkan dev packages (Linux)"
if: inputs.matrix-os == 'ubuntu-latest'
run: |
sudo apt-get install -y libvulkan-dev glslc
shell: bash

- name: "Install Vulkan SDK (Windows)"
if: inputs.matrix-os == 'windows-2025'
shell: powershell
run: |
$vulkanVersion = "1.4.313.2"
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/$vulkanVersion/windows/vulkansdk-windows-X64-$vulkanVersion.exe"
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\$vulkanVersion"
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\$vulkanVersion\Bin"

- name: "Build llama.cpp (Linux)"
if: inputs.matrix-os == 'ubuntu-latest'
run: |
cd backend/util/llama-go
BUILD_TYPE=vulkan CMAKE_ARGS="-DBUILD_SHARED_LIBS=OFF" make libbinding.a
shell: bash

- name: "Build llama.cpp (macOS)"
if: startsWith(inputs.matrix-os, 'macos')
run: |
cd backend/util/llama-go
BUILD_TYPE=metal CMAKE_ARGS="-DBUILD_SHARED_LIBS=OFF" make libbinding.a
shell: bash

- name: "Build llama.cpp (Windows)"
if: inputs.matrix-os == 'windows-2025'
shell: bash
run: |
set -euo pipefail
cd backend/util/llama-go

cmake -G "MinGW Makefiles" -B build -S llama.cpp \
-DGGML_VULKAN=ON \
-DGGML_OPENMP=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DLLAMA_CURL=OFF \
-DLLAMA_BUILD_TESTS=OFF \
-DLLAMA_BUILD_TOOLS=OFF \
-DLLAMA_BUILD_EXAMPLES=OFF \
-DLLAMA_BUILD_SERVER=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++

cmake --build build --config Release -j "$(nproc)"

cp build/src/libllama.a ./libllama.a
cp build/ggml/src/ggml.a ./libggml.a
cp build/ggml/src/ggml-base.a ./libggml-base.a
cp build/ggml/src/ggml-cpu.a ./libggml-cpu.a
cp build/ggml/src/ggml-vulkan/ggml-vulkan.a ./libggml-vulkan.a
cp build/common/libcommon.a ./libcommon.a
cp "$VULKAN_SDK/Lib/vulkan-1.lib" ./libvulkan-1.a

for lib in libllama.a libggml.a libggml-base.a libggml-cpu.a libggml-vulkan.a libcommon.a libvulkan-1.a; do
[ -f "$lib" ] || { echo "ERROR: Missing $lib"; exit 1; }
done

echo "All llama.cpp libraries built successfully"

# Additional packages for Flatpak building

- name: "Setup Flatpak"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/desktop-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- uses: ./.github/actions/ci-setup
with:
Expand All @@ -80,10 +82,13 @@ jobs:
- name: Build Backend (Unix)
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-x86_64-unknown-linux-gnu ./backend/cmd/seed-daemon
env:
GOARCH: amd64
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Set temporal version in package.json
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/desktop-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- uses: ./.github/actions/ci-setup
with:
Expand All @@ -44,20 +46,26 @@ jobs:
if: matrix.config.os != 'windows-2025'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Build Backend (Windows)
if: matrix.config.os == 'windows-2025'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe ./backend/cmd/seed-daemon
env:
GOOS: "windows"
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Set temporal version in package.json
run: |
Expand Down
83 changes: 82 additions & 1 deletion .github/workflows/dev-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,38 @@ jobs:
- os: windows-2025
arch: x64
goarch: amd64
daemon_name: x86_64-pc-windows-msvc
daemon_name: x86_64-pc-windows-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache GGUF model
uses: actions/cache@v4
with:
path: backend/llm/backends/llamacpp/models/*.gguf
key: gguf-model-granite-v2
enableCrossOsArchive: true

- name: Download GGUF model (Unix)
if: matrix.config.os != 'windows-2025'
run: |
if [ ! -f backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf ]; then
mkdir -p backend/llm/backends/llamacpp/models
curl -fSL -o backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf \
"https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true"
fi

- name: Download GGUF model (Windows)
if: startsWith(matrix.config.os, 'windows')
shell: pwsh
run: |
$modelPath = "backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf"
if (-not (Test-Path $modelPath)) {
New-Item -ItemType Directory -Force -Path "backend/llm/backends/llamacpp/models"
Invoke-WebRequest -Uri "https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true" -OutFile $modelPath
}

- uses: ./.github/actions/ci-setup
with:
Expand All @@ -86,20 +114,73 @@ jobs:
if: matrix.config.os != 'windows-2025'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Build Backend (Windows)
if: matrix.config.os == 'windows-2025'
shell: bash
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe ./backend/cmd/seed-daemon
env:
GOOS: "windows"
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
CGO_LDFLAGS: -static-libgcc -static-libstdc++
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Stage Windows runtime DLL
if: matrix.config.os == 'windows-2025'
shell: bash
run: |
set -euo pipefail
DLL_PATH="$(gcc -print-file-name=libwinpthread-1.dll)"

if [ ! -f "$DLL_PATH" ]; then
echo "ERROR: libwinpthread-1.dll not found in gcc toolchain"
exit 1
fi

cp "$DLL_PATH" plz-out/bin/backend/libwinpthread-1.dll
ls -la plz-out/bin/backend/libwinpthread-1.dll

- name: Verify Windows daemon runtime deps
if: matrix.config.os == 'windows-2025'
shell: bash
run: |
set -euo pipefail
BIN="plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe"

if ! command -v objdump >/dev/null 2>&1; then
echo "objdump not available on runner; skipping dependency check"
exit 0
fi

DLLS="$(objdump -p "$BIN" | awk '/DLL Name:/ {print $3}')"
echo "Windows DLL imports:"
echo "$DLLS"

if echo "$DLLS" | grep -Eiq '^(libstdc\+\+-6\.dll|libgcc_s_seh-1\.dll|libgomp-1\.dll)$'; then
echo "ERROR: MinGW runtime DLL dependency is still present"
exit 1
fi

if echo "$DLLS" | grep -Eiq '^libwinpthread-1\.dll$'; then
if [ ! -f "plz-out/bin/backend/libwinpthread-1.dll" ]; then
echo "ERROR: daemon imports libwinpthread-1.dll but runtime DLL is not staged"
exit 1
fi

echo "libwinpthread-1.dll import detected and staged correctly"
fi

- name: Set MacOS signing certs
if: startsWith(matrix.config.os, 'macos')
Expand Down
48 changes: 46 additions & 2 deletions .github/workflows/dev-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,56 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache GGUF model
uses: actions/cache@v4
with:
path: backend/llm/backends/llamacpp/models/*.gguf
key: gguf-model-granite-v2
enableCrossOsArchive: true

- name: Download GGUF model
run: |
if [ ! -f backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf ]; then
mkdir -p backend/llm/backends/llamacpp/models
curl -fSL -o backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf \
"https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true"
fi

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25.4"
- run: go test --count 1 ./backend/...

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ libvulkan-dev glslc

- name: Build llama.cpp (with Vulkan GPU support)
run: |
cd backend/util/llama-go
BUILD_TYPE=vulkan CMAKE_ARGS="-DBUILD_SHARED_LIBS=OFF" make libbinding.a

- name: Run tests
run: go test --count 1 ./backend/...
env:
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go
LLAMA_LOG: error

# Run tests again with the race-detector.
# Using the same job to reuse the build cache.
- run: go test --count 1 -race ./backend/...
- name: Run tests with race detector
run: go test --count 1 -race ./backend/...
env:
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go
LLAMA_LOG: error
generate-docker-images:
runs-on: ubuntu-latest
needs: [frontend-tests, backend-tests]
Expand All @@ -51,6 +93,8 @@ jobs:

- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Get commit date for the triggering commit
run: |
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ jobs:
with:
go-version: "1.25.4"
- uses: actions/checkout@v4

- name: Cache GGUF model
uses: actions/cache@v4
with:
path: backend/llm/backends/llamacpp/models/*.gguf
key: gguf-model-granite-v2
enableCrossOsArchive: true

- name: Download GGUF model
run: |
if [ ! -f backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf ]; then
mkdir -p backend/llm/backends/llamacpp/models
curl -fSL -o backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf \
"https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true"
fi

- uses: golangci/golangci-lint-action@v8
with:
version: latest
Expand Down
Loading
Loading