Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ from any host: Windows (Docker Desktop / WSL2) or Linux directly.
- Node 22 + Rust stable (official devcontainer features, no remote scripts)
- Tauri 2 Linux system dependencies (`libwebkit2gtk-4.1-dev`,
`libayatana-appindicator3-dev`, `librsvg2-dev`, `libsecret-1-dev`,
`patchelf`, `build-essential`, …)
`libdbus-1-dev`, `pkg-config`, `patchelf`, `build-essential`, …)
- `xvfb` + `dbus-run-session` for the headless smoke
- cargo/npm caches in named volumes (`quorb-cargo-home`, `quorb-npm-cache`),
persistent across rebuilds
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ sudo apt-get install -y --no-install-recommends \
file \
patchelf \
libwebkit2gtk-4.1-dev \
libdbus-1-dev \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
file \
patchelf \
libwebkit2gtk-4.1-dev \
libdbus-1-dev \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
Expand Down Expand Up @@ -127,20 +128,14 @@ jobs:
run: timeout -k 10 600 xvfb-run -a cargo test --locked window_fit -- --ignored --nocapture

# ---- W3 #106: Secret Service smoke (Linux real) ----
# Los smokes `linux_secret_service_round_trip` y
# `linux_legacy_migrate_once_then_legacy_is_gone` (secrets.rs) están
# `#[ignore]` porque necesitan un Secret Service real (D-Bus +
# libsecret). Aquí se monta uno efímero: `dbus-run-session` crea un
# session bus aislado (y ya exporta DBUS_SESSION_BUS_ADDRESS) y
# `gnome-keyring-daemon --unlock` levanta el servicio con una contraseña
# de prueba propia del runner.
# El primero guarda/lee/borra un valor de prueba (backend `linux-native`
# del crate `keyring`); el segundo puebla el servicio LEGADO
# (es.egdev.ai-usage) y verifica que get() migra al destino actual,
# que el valor se reescribe y que el legado desaparece (criterio AC2).
# QUORB_SECRETS_SMOKE_ISOLATED=1 se define SOLO dentro de esta sesión
# aislada: el smoke de migración falla sin ella, así nunca toca un
# llavero real de un escritorio.
# Los smokes de secrets.rs están `#[ignore]` porque necesitan un
# Secret Service real. `dbus-run-session` crea un bus aislado y
# `gnome-keyring-daemon --unlock` levanta un servicio efímero. Además
# del round trip y la migración legacy, se comprueban la lectura de
# entradas keyutils antiguas, la persistencia y el borrado directamente
# en Secret Service, y el error explícito al faltar el servicio.
# QUORB_SECRETS_SMOKE_ISOLATED=1 solo se define en esta sesión aislada;
# todos los smokes comprueban la puerta antes de tocar el llavero.
- name: Secret Service smoke (gnome-keyring, D-Bus session)
run: |
echo "► Arrancando Secret Service efímero (dbus-run-session + gnome-keyring)..."
Expand Down Expand Up @@ -178,6 +173,10 @@ jobs:
cd src-tauri
echo "► Corriendo smoke linux_secret_service_round_trip (--ignored)..."
cargo test --locked linux_secret_service_round_trip -- --ignored --nocapture
echo "► Corriendo smoke linux_secret_service_persistent_store (--ignored)..."
cargo test --locked linux_secret_service_persistent_store -- --ignored --nocapture
echo "► Corriendo smoke linux_secret_service_unavailable_is_error (--ignored)..."
cargo test --locked linux_secret_service_unavailable_is_error -- --ignored --nocapture
echo "► Corriendo smoke linux_legacy_migrate_once_then_legacy_is_gone (--ignored)..."
cargo test --locked linux_legacy_migrate_once_then_legacy_is_gone -- --ignored --nocapture
echo " QUORB_SECRETS_SMOKE_ISOLATED=$QUORB_SECRETS_SMOKE_ISOLATED (aislamiento verificado)"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linux-pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
file \
patchelf \
libwebkit2gtk-4.1-dev \
libdbus-1-dev \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linux-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
file \
patchelf \
libwebkit2gtk-4.1-dev \
libdbus-1-dev \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
Expand Down
4 changes: 2 additions & 2 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Ilustraciones promocionales, no capturas directas.

### Privacidad y datos locales

Las API keys y la sesión de NaN se guardan en el almacén seguro del sistema (Windows Credential Manager; en Linux, Secret Service; en macOS, Keychain). Los archivos de sesión de las herramientas oficiales se leen sin escribir en ellos ni rotar refresh tokens. Gemini renueva su token de acceso de corta duración en memoria. Si caduca el login de una CLI, iniciad sesión de nuevo con la herramienta oficial.
Las API keys y la sesión de NaN se guardan en el almacén seguro del sistema (Windows Credential Manager; en Linux, un almacén persistente Secret Service con keyutils del kernel como caché; en macOS, Keychain). Linux requiere un Secret Service en ejecución, como GNOME Keyring o KWallet. Las credenciales que versiones anteriores guardaron solo en keyutils se copian a Secret Service la primera vez que Quorb las lee, siempre que sea antes de un reinicio. Los archivos de sesión de las herramientas oficiales se leen sin escribir en ellos ni rotar refresh tokens. Gemini renueva su token de acceso de corta duración en memoria. Si caduca el login de una CLI, iniciad sesión de nuevo con la herramienta oficial.

La configuración y el historial se guardan en la carpeta de usuario de cada plataforma (`%APPDATA%\es.egdev.quorb` en Windows, `~/.config/es.egdev.quorb` en Linux). Quorb consulta directamente los endpoints de los proveedores; no requiere un backend separado. El historial cubre hasta 30 días.

Expand All @@ -199,7 +199,7 @@ La firma Authenticode de Windows y distribución por winget, el modo click-throu

Está en marcha un port nativo de Linux (issues ODD #105–#108 del proyecto `quorb-linux-local-v1`). Lo que funciona hoy es desarrollo y pruebas locales, no una release distribuida:

- Requisitos: Node 22+, Rust y las librerías de sistema habituales de Tauri (`libwebkit2gtk-4.1-dev`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Para ejecutar desde fuente, `npm install` + `npm run app:dev`.
- Requisitos: Node 22+, Rust y las librerías de sistema habituales de Tauri (`libwebkit2gtk-4.1-dev`, `libdbus-1-dev`, `pkg-config`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Para ejecutar desde fuente, `npm install` + `npm run app:dev`.
- Los formatos de bundle local instalable ya están decididos: `.deb` para Debian/Ubuntu y `.AppImage` para Arch y el resto (ver [`docs/build-linux.md`](./docs/build-linux.md)). Se construyen y verifican con el workflow manual de Linux (`.github/workflows/linux-ci.yml`, `with_bundle: bundle`) o localmente con `npm run app:build` + los scripts `.testcontainer/verify-*.sh`. Los artefactos del CI quedan privados a cada run; las releases públicas de Linux quedan fuera de alcance por ahora.
- Las limitaciones de sesión y comportamiento dependen del escritorio, y Ajustes las muestra por superficie en el bloque «Sesión de escritorio»:
- X11: comportamiento completo de siempre-encima, icono de bandeja, atajos globales y transparencia (esta última solo con un compositor).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Promotional illustrations, not raw screenshots.

### Privacy and local data

API keys and the NaN session are stored in the system's secure store (Windows Credential Manager; on Linux, Secret Service; on macOS, Keychain). Official CLI/app session files are read without writing to them or rotating refresh tokens. Gemini refreshes its short-lived access token in memory. If a CLI login expires, sign in again through the official tool.
API keys and the NaN session are stored in the system's secure store (Windows Credential Manager; on Linux, a persistent Secret Service store with kernel keyutils as a cache; on macOS, Keychain). Linux requires a running Secret Service such as GNOME Keyring or KWallet. Credentials saved by earlier versions only in keyutils are copied into Secret Service the first time Quorb reads them, as long as that happens before a reboot. Official CLI/app session files are read without writing to them or rotating refresh tokens. Gemini refreshes its short-lived access token in memory. If a CLI login expires, sign in again through the official tool.

Configuration and history are stored under the platform user directory (`%APPDATA%\es.egdev.quorb` on Windows, `~/.config/es.egdev.quorb` on Linux). Quorb calls provider endpoints directly; no separate backend is required. History covers up to 30 days.

Expand All @@ -197,7 +197,7 @@ Windows Authenticode signing and winget distribution, click-through mode and NaN

A native Linux port is under development (tracking issues #105–#108 of the ODD project `quorb-linux-local-v1`). What works today is local development and testing, not a distributed release:

- Requirements: Node 22+, Rust, and the usual Linux system libraries of Tauri (`libwebkit2gtk-4.1-dev`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Run from source with `npm install` + `npm run app:dev`.
- Requirements: Node 22+, Rust, and the usual Linux system libraries of Tauri (`libwebkit2gtk-4.1-dev`, `libdbus-1-dev`, `pkg-config`, `build-essential`, `curl`, `wget`, `file`, `libxdo-dev`, `libssl-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`). Run from source with `npm install` + `npm run app:dev`.
- Local installable bundles are decided: `.deb` for Debian/Ubuntu and `.AppImage` for Arch and the rest (see [`docs/build-linux.md`](./docs/build-linux.md)). They are built and verified by the manual Linux workflow (`.github/workflows/linux-ci.yml`, `with_bundle: bundle`) or locally with `npm run app:build` + the `.testcontainer/verify-*.sh` scripts. CI artifacts stay private to each run; public Linux releases are out of scope for now.
- Session and behaviour limits depend on the desktop session, and Settings shows them per surface in the «Sesión de escritorio» block:
- X11: complete behaviour of always-on-top, tray icon, global shortcuts and transparency (the last only with a compositing WM).
Expand Down
32 changes: 20 additions & 12 deletions docs/build-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
> Wayland) y el contrato de soporte inicial **antes** de L1/L2/L3.
> **Cero código en esta unidad**: solo mediciones, decisiones y docs.
> Compilación ≠ experiencia funcional.
>
> **Backend actual de secretos (#302):** Secret Service es el almacén
> persistente y keyutils del kernel actúa como caché. Se necesita un Secret
> Service en ejecución, por ejemplo GNOME Keyring o KWallet. Las credenciales
> anteriores que solo estén en keyutils se copian a Secret Service la primera
> vez que Quorb las lee, siempre que sea antes de un reinicio. Las mediciones
> del baseline de 0.8.0 citadas abajo son históricas.

## 1. Resumen ejecutivo

Expand Down Expand Up @@ -57,8 +64,9 @@ node 24.15, npm 12.0.1, rustc/cargo 1.99, TypeScript 5.9, Vite 7, vitest 4.1.11.

tauri 2 (`tray-icon`, `protocol-asset`) + 9 plugins (opener, autostart,
single-instance, notification, dialog, global-shortcut, updater, process);
reqwest (`rustls-tls`, sin openssl), rusqlite `bundled`, keyring con feature
`linux-native`, serde/serde_json, chrono, dirs, base64, futures, libc (unix).
reqwest (`rustls-tls`, sin openssl), rusqlite `bundled`, keyring con features
`linux-native-sync-persistent` y `crypto-rust`, serde/serde_json, chrono, dirs,
base64, futures, libc (unix). El backend usa libdbus del sistema, sin `vendored`.

### 3.3 Dependencias de sistema (runtime, las que declara el `.deb`)

Expand Down Expand Up @@ -86,6 +94,7 @@ Del `setup.sh` / workflow `apt-get install` (versiones medidas en devcontainer
| libayatana-appindicator3-dev | 0.5.90-7ubuntu2 |
| libxdo-dev | 1:3.20160805.1-4 |
| libgtk-3-dev, libsecret-1-dev, librsvg2-dev, libnotify-dev, libssl-dev, build-essential, pkg-config | instalados vía `setup.sh` (no listados en la sesión) |
| libdbus-1-dev | requerido desde #302; no medido en el baseline histórico |

**Nota**: el host (26.04) **no tiene las dev libs** (`webkit2gtk-4.1`,
`gtk+-3.0`, `libsecret-1`, `ayatana-appindicator3-0.1`, `librsvg-2.0`,
Expand Down Expand Up @@ -172,11 +181,10 @@ Dos niveles de evidencia, separados explícitamente:
arranque directo del AppImage en este escritorio real con
`AppImageLauncher` presente, con workaround probado (unsquashfs + AppRun)
y el `.deb` como vía recomendada en Debian/Ubuntu.
4. **Backend de secretos** — `keyring` usa la feature `linux-native`, cuyo
backend real es `linux-keyutils`/keyutils del kernel. La prueba end-to-end
de esta unidad debe medir ese backend (y, si el criterio se mantiene como
«Secret Service», registrar explícitamente que no es el backend configurado),
sin exponer credenciales. #106 ya está cerrada; no queda como placeholder.
4. **Backend de secretos del baseline 0.8.0** — entonces `keyring` usaba
`linux-native`, solo keyutils del kernel. Desde #302 se configura el backend
combinado: Secret Service persiste y keyutils sirve de caché. Las mediciones
históricas de #106 no prueban el backend persistente actual.
5. **Hallazgos de contribuidores** (del comentario de Rafael en #105):
`connect_map` GTK crash y `startDragging()` nativo vs layer-shell pertenecen
al ajuste de escritorio de #107/#290, no al empaquetado de #108.
Expand Down Expand Up @@ -222,7 +230,7 @@ timeout -k 5 30 /usr/bin/quorb > launch.log 2>&1; echo $? # -> 124
# gdk_wayland_window_set_dbus_properties_libgtk_only, libayatana-appindicator
# is deprecated, gtk_widget_get_scale_factor.

# 4) Backend de secretos real (keyutils del kernel, no Secret Service)
# 4) Backend de secretos del baseline 0.8.0 (keyutils, antes de #302)
keyctl show
# Session Keyring con los keyrings de sesión, usuario y persistente (keyutils)

Expand Down Expand Up @@ -396,7 +404,7 @@ sesión Wayland, Quorb por XWayland (`GDK_BACKEND=x11`), tres escritorios.
| AppImage: cadena FUSE + librerías gráficas de runtime | Media: monta en CI (kernel 6.8 y 7.0, runs del fork) pero falla en el escritorio real del host (§4.3 fallo 3) | Bajo (el `.deb` no lo sufre) | Requiere `/dev/fuse` (cargar el módulo con `sudo modprobe fuse` solo si no está cargado, §10) y, en los runs del fork, `libegl1/libgl1/libgles2` + `libfuse2`/`libfuse2t64`; workaround `--appimage-extract-and-run` | Runs de §4.3: montaje FUSE + vivo 60 s en CI |
| WebKit2GTK ≥ 2.40 / GTK ≥ 3.22 (distros antiguas) | Media | Alto (excluye usuarios) | Documentar versión mínima; diferir distros no-Debian/Arch | PRD línea 110; `linux-ci.yml` apt |
| libayatana deprecation warning en runtime | Alta (cosmético) | Bajo | Nada (no impide) | Log de arranque del `.deb` (host) |
| `keyring` linux-native requiere keyutils disponible (keyring del kernel); entorno sin keyutils | Media | Medio | Fallo explícito del command, no degradar a texto plano; #106 ya cerrada y el backend real queda documentado aquí | `src-tauri/src/secrets.rs` (`keyring::Entry::new`) |
| `keyring` requiere keyutils y un Secret Service en ejecución (GNOME Keyring o KWallet) | Media | Medio | Fallo explícito al guardar si no hay Secret Service, sin fallback a texto plano; keyutils es solo la caché | `src-tauri/src/secrets.rs` (`keyring::Entry::new`) |
| `connect_map` GTK crash (Rafael) | Desconocida | Medio | Ajuste de escritorio #107/#290, fuera del empaquetado | Comentario de Rafael en #105 |
| `startDragging()` nativo vs layer-shell (Rafael) | Desconocida | Medio | Ajuste de escritorio #107/#290, fuera del empaquetado | Comentario de Rafael en #105 |
| ~~No hay gate de CI Linux para PRs~~ (resuelto en #150; infra de bundles en #127/#108) | — | — | `linux-pr-ci.yml` (tests+build por PR, desde #150) y `linux-ci.yml` (manual, `with_bundle`, desde #127/#108) | `linux-ci.yml`/`linux-pr-ci.yml` en `main` |
Expand All @@ -422,7 +430,7 @@ sesión Wayland, Quorb por XWayland (`GDK_BACKEND=x11`), tres escritorios.

| Nivel | Issue | Alcance | Validación |
|---|---|---|---|
| L1 | #106 — sesiones, secretos y login CLI nativos (**cerrada**) | Rutas Linux, backend real `keyring`/keyutils, login CLI y recuperación documentados | Validación de #106; límites de escritorio real explícitos en §6 |
| L1 | #106 — sesiones, secretos y login CLI nativos (**cerrada**) | Rutas Linux, backend de entonces `keyring`/keyutils, login CLI y recuperación documentados | Validación histórica de #106; backend actual combinado desde #302 |
| L2 | #107 — escritorio y widget nativos (**integrada; ajuste diagnóstico en #290**) | Bloque de compatibilidad y fixes de escritorio; tao#1204 integrado en `main` | Smoke de CI + ajustes pendientes de #290 |
| L3 | #108 — empaquetar y documentar un build local verificable (**esta PR**) | `.deb` + `.AppImage` reproducibles, docs actualizados y gate Linux ya disponible | `linux-ci.yml` + `linux-pr-ci.yml` + evidencia de AppImage en §4.3 |

Expand All @@ -435,7 +443,7 @@ en este baseline).
# --- Build-time deps (solo para contribuir / hacer cargo test) ---
# Host Ubuntu 22.04/26.04:
sudo apt-get install -y build-essential pkg-config libwebkit2gtk-4.1-dev \
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev \
libdbus-1-dev libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev \
libsecret-1-dev libnotify-dev libgtk-3-dev
# (o usar el devcontainer: `devcontainer up` según el Makefile — evita
# tocar el host; no requiere instalar nada en la máquina real)
Expand Down Expand Up @@ -463,7 +471,7 @@ sudo apt install linux-modules-extra-$(uname -r)
|---|---|---|
| `src-tauri/tauri.conf.json` | Windows-first con Linux: `nsis`/`msi` + `deb`/`appimage` | Confirmado desde #108: `bundle.targets` de `main` incluye los cuatro |
| `src-tauri/src/lib.rs` `run()` | Arranque sin crash, single-instance, shortcuts, tray | Arranca en host: `.deb` 0.8.0 y AppImage 0.8.0 extraído, ambos exit 124 = vivo 30 s (evidencia de la versión actual en §4.4 de esta PR); panic tao#1204 resuelto e integrado (via #107) |
| `src-tauri/src/secrets.rs` | `keyring::Entry::new` con `linux-native` (keyutils, `linux-keyutils`) | Backend real: keyutils; persistencia y fallo sin keyutils validados en #106 (cerrada) |
| `src-tauri/src/secrets.rs` | `keyring::Entry::new` con `linux-native-sync-persistent` | Secret Service persistente con caché keyutils; el baseline #106 medía el backend anterior solo keyutils |
| `src-tauri/src/login.rs` | Login CLI con terminal Linux | Cascade `$TERMINAL → ghostty → kitty → alacritty`, validado en #106 (cerrada) |
| `src-tauri/src/providers/` (11 módulos: anthropic_api, claude, codex, copilot, cursor, gemini, nan, nan_cloud, openai_api, openrouter) | Puro HTTP (reqwest) | Sin dependencia específica de plataforma; portables |
| `src/lib/dock.ts` | Geometría de bordes (píxeles lógicos) | Sin dependencia de plataforma; portables |
Expand Down
2 changes: 1 addition & 1 deletion docs/i18n-inventory.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# i18n inventory (egdev6/quorb#66)

Generated by `node scripts/i18n-inventory.mjs` from the source trees `src/` = `5d1f8cd9a87b8308b2397ee124ddf7895400568b` and `src-tauri/src/` = `404315f914c8a61c84a0c3bf550df11b56d33a81`.
Generated by `node scripts/i18n-inventory.mjs` from the source trees `src/` = `5d1f8cd9a87b8308b2397ee124ddf7895400568b` and `src-tauri/src/` = `4e040c3e38251119abf3e7d0de46376d82d9c885`.
Any commit whose `git rev-parse <commit>:src` and `<commit>:src-tauri/src` match has these exact texts.
Do not edit by hand: regenerate, or verify with `node scripts/i18n-inventory.mjs --check`.

Expand Down
Loading
Loading