Linux port: first run, packaging, single instance, privacy and wiring
CI / test (push) Has been cancelled
CI / test (push) Has been cancelled
First run and backend - The companion opens without Ollama or a model (OFFLINE / SETUP REQUIRED), opens Settings > Language model and picks the model up once downloaded. - Model, provider and GPU changes apply without restarting (Ollama is restarted when launch settings change); no silent fallback from API mode. - Fatal startup errors are shown in a window; the fallback avatar loads again; the shipped Capri artwork is used when nothing was imported. Packaging and tooling - packaging/arch/PKGBUILD, capri.desktop (KWin ScreenShot2 key), icons, artwork under /usr/share/capri/assets, Gitea Actions CI. - xtask: `icons` and `release-check` (no private data or credentials). Runtime - One instance per data folder (flock + control socket): second launch shows the window; capri stop / restart / toggle / status (JSON, starts nothing) / doctor / setup / diagnostics export / purge. - A foreign program on the Ollama port is refused; an Ollama left behind by Capri is replaced. Privacy and security - No raw Ollama log on disk; API keys are never saved in plaintext (old ones move to the keyring); refused credential notes are stored as [Credentials omitted]; launched apps get an allow-listed environment. Fixes - Stop/Escape silence the voice; saved voice effects apply to replies; settings_control glitch settings apply; distinct KWin cursor scripts; KDE window capture authorized for source builds; Linux wording. - Voice pack references zipped with Windows separators are found. Wired features - Initiatives, request router, resource monitor, "clip that", questions about a snapshot, sleep mode, tap reactions, stopwatch, attachments, Internet mode button, voice-synced subtitles, wake visuals, dictation draft, tray switches, Spotify seek/shuffle/repeat; computer-control planner and classifier follow model switches and API mode. - Approval cards: one shown, 8 queued, deduplicated, cancelled on stop, failure, lock or pause; one Application access switch. Desktop - Compositor detection (no black overlay on i3 without picom), i3lock detection, unsupported desktops reported at startup, screenshot-only control without AT-SPI, fontconfig fallbacks, translatable feature pages with French translations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
73 files changed
+4834
-517
No files matched your search
@@ -0,0 +1,102 @@
|
||||
# Maintainer: fkDead <suzuku295 at gmail dot com>
|
||||
# Builds the latest commit of the Rust rewrite (cloned from the repository): `makepkg -si` in this folder.
|
||||
pkgname=capri-git
|
||||
_pkgname=capri
|
||||
pkgver=0.1.0.r0.g0000000
|
||||
pkgrel=1
|
||||
pkgdesc="Capri desktop AI companion, rewritten in Rust for Linux (KDE Plasma and i3)"
|
||||
arch=(x86_64)
|
||||
url="https://gitea.nocode-var.tech/nocode/capri-core-rust"
|
||||
license=(GPL-3.0-only OFL-1.1 LicenseRef-Capri-artwork)
|
||||
# Ollama is also provided by ollama-cuda / ollama-rocm / ollama-vulkan; Capri checks the
|
||||
# minimum version (0.40.10) at runtime because Arch rolls forward.
|
||||
depends=(
|
||||
ollama
|
||||
alsa-lib
|
||||
at-spi2-core
|
||||
dbus
|
||||
fontconfig
|
||||
gcc-libs
|
||||
glibc
|
||||
hicolor-icon-theme
|
||||
libglvnd
|
||||
libpulse
|
||||
libx11
|
||||
libxcb
|
||||
libxcursor
|
||||
libxi
|
||||
libxkbcommon
|
||||
libxrandr
|
||||
wayland
|
||||
)
|
||||
makedepends=(git cargo cmake)
|
||||
optdepends=(
|
||||
'pipewire-pulse: named microphones, music detection and call audio (parec, pactl)'
|
||||
'pipewire-alsa: default microphone and speakers through PipeWire'
|
||||
'xdg-desktop-portal-kde: computer control on KDE Plasma (Remote Desktop portal)'
|
||||
'spectacle: screen capture on KDE Plasma'
|
||||
'snixembed: tray icon on i3'
|
||||
'picom: transparency and click-through shapes on i3'
|
||||
'gnome-keyring: Secret Service for API keys on i3 (KWallet provides it on KDE)'
|
||||
'xdg-utils: open links and folders'
|
||||
'nvidia-utils: GPU detection (nvidia-smi)'
|
||||
)
|
||||
provides=(capri)
|
||||
conflicts=(capri)
|
||||
# makepkg's LTO flags break the C++ build of whisper.cpp; release builds use Cargo's thin LTO.
|
||||
options=(!lto)
|
||||
source=("$_pkgname::git+$url.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$_pkgname"
|
||||
printf "%s.r%s.g%s" \
|
||||
"$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)" \
|
||||
"$(git rev-list --count HEAD)" \
|
||||
"$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$_pkgname"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_pkgname"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
# Note: the ort crate downloads its ONNX Runtime build here (statically linked, used by the voice).
|
||||
cargo build --frozen --release --package capri --jobs "$(nproc)"
|
||||
cargo run --frozen --release --quiet --package xtask -- icons target/icons
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$_pkgname"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo test --frozen --release --workspace --jobs "$(nproc)"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_pkgname"
|
||||
install -Dm755 target/release/capri "$pkgdir/usr/bin/capri"
|
||||
install -Dm644 packaging/capri.desktop "$pkgdir/usr/share/applications/capri.desktop"
|
||||
local size
|
||||
for size in 16 32 48 64 128 256 512; do
|
||||
install -Dm644 "target/icons/hicolor/${size}x${size}/apps/capri.png" \
|
||||
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/capri.png"
|
||||
done
|
||||
# Artwork, intro, poses, music pack and sounds, in the repository layout (read from /usr/share/capri/assets).
|
||||
local dir file
|
||||
for dir in capri default sounds; do
|
||||
while IFS= read -r -d '' file; do
|
||||
install -Dm644 "$file" "$pkgdir/usr/share/capri/$file"
|
||||
done < <(find "assets/$dir" -type f -print0)
|
||||
done
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -Dm644 assets/fonts/exo2/OFL.txt "$pkgdir/usr/share/licenses/$pkgname/Exo2-OFL.txt"
|
||||
# The character artwork is not GPL: its terms are the README's "Dessins de Capri" section.
|
||||
sed -n '/^## Dessins de Capri/,/^## Structure/{/^## Structure/d;p}' README.md > ARTWORK.txt
|
||||
install -Dm644 ARTWORK.txt "$pkgdir/usr/share/licenses/$pkgname/ARTWORK.txt"
|
||||
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Capri
|
||||
Comment=AI desktop companion
|
||||
Exec=capri
|
||||
Icon=capri
|
||||
Terminal=false
|
||||
Categories=Utility;
|
||||
StartupWMClass=capri
|
||||
SingleMainWindow=true
|
||||
# KWin only lets applications with this key capture a single window (org.kde.KWin.ScreenShot2).
|
||||
X-KDE-DBUS-Restricted-Interfaces=org.kde.KWin.ScreenShot2
|
||||
Reference in new issue
Block a user