Watch
1
0
Fork
You've already forked souveraine
0
Commit graph

171 commits

Author SHA1 Message Date
Fimeg
e10efbbd56 lock surface: restore redacted chat on unlock + announce replies
Redacted messages stayed '[content hidden until unlock]' forever — nothing
restored them on unlock. Redaction now records the message and unlock
restores content from rawContent. Turns finishing while locked are also
redacted and surfaced. New LockAgentCard shows a one-line preview of
replies that landed during the lock window on the lock glance, like a
notification; body stays hidden until unlock.

sessiond auth: getpwuid_r buffer is u8 with a c_char cast so it compiles
on aarch64 (c_char = u8 there) and x86 (c_char = i8).
2026-07-16 21:16:28 -04:00
Fimeg
dc9fe900ec conversation seeding + memfs frontmatter fixes
API-created conversations (shell /agent, /new) never got a system prompt —
the agent booted amnesiac with no constitution, memories, or skills. Prompt
seeding now lives on SouveraineServer and every entry point shares it.

Memory frontmatter: stop serializing None as 'key: null', round-trip
unknown keys instead of destroying them, merge agent-supplied frontmatter
instead of nesting a second block in the body, and make reads tolerant so
a nonconforming file can still be read and healed.
2026-07-16 20:57:41 -04:00
Fimeg
856c6e5576 sessiond: session authority daemon — lock-before-shell, lock-past-shell-death
ext-session-lock client that locks at session start, hands the lock to the
shell over a runtime socket without an unlocked instant (abandon + restore),
and retakes it the moment the shell heartbeat drops. Spartan PIN fallback
surface, PAM via hand-rolled libpam FFI, machined-style sync server.
Shell side: SessiondBridge singleton + LockScreen initIfReady routes the
startup lock decision through the handshake.
2026-07-16 20:32:46 -04:00
Fimeg
b18fa331e0 idle: wire the dim stage and native-coordinator hardening
Dimmed now actually lowers the backlight (brightnessctl save/restore)
and Active restores it - previously dimRequested had no consumer, so
auto-dim never existed on this stack. Keep System Awake is checked
inside the monitor handlers rather than bound to enabled: recreating
the ext-idle-notify object during lock teardown is a fatal Wayland
protocol error on the Pixel compositor. Defaults now mirror the
hypridle timers (dim 120s, lock 300s).
2026-07-16 17:44:01 -04:00
Fimeg
b4dc39e501 parse reasoning_content alias (deepseek/z.ai reasoning field name) 2026-07-16 13:03:51 -04:00
Fimeg
33068d69ff turn errors reach every surface: Error event end-to-end, no more silent empty replies 2026-07-16 12:55:49 -04:00
Fimeg
da410b1e6a hosted agents: read seeds from the live agents tree, not server/agents 2026-07-16 12:20:56 -04:00
Fimeg
c96f95b9da quickshell: fix drag-to-combine, rail rides the keyboard, overview gap-tap dismiss
The drag ghost was anchored (centerIn) — Qt won't move an anchored
drag.target, so no DropArea ever fired and stack creation died silently;
position it on press instead. Drag lifecycle now sets dockDragInProgress
(the DockManifest guard finally has a writer). Restored pulseDockReveal,
lost in a refactor while its osk.pulseDock caller survived.

Rail lifts atop squeekboard by measured layer height (hyprctl -j layers,
namespace osk); swipe down dismisses the keyboard first, then a visible
dock in any state (new dockSuppressed, cleared by swipe up). Overview:
taps in the grid's dead space dismiss it instead of being eaten.
DockConfig grew the real pins/stacks editor (unpin, rename, unstack,
dissolve).
2026-07-16 12:04:08 -04:00
Fimeg
8e540c773d instance awareness: device_announce carries hosted_agents
The full server's bridge now announces which agent pubkeys this box
hosts (read fresh per reconnect), same list the lite listener already
computed — loader moved to federation/mod.rs and shared. DeviceRegistry
records it (serde default keeps old known_peers.json parsing) and
souveraine peers shows a hosts: line. Durable memfs-side instance log
still to come.
2026-07-16 11:17:47 -04:00
Fimeg
a62379ad8a memory sync: manual push/fetch against the shared memfs remote
Per-instance branch (instance/{machine-pubkey-prefix} until commission
labels exist) on the origin remote. Fetch + push only — never touches
the working tree; merge policy is the next step. Shells out to system
git so creds work like everywhere else. Loud without a remote;
provisioning stays explicit.
2026-07-16 11:11:49 -04:00
Fimeg
8cfa992da2 memfs_commit presence signal on the bus after memory mutations
One event per memfs write/append/delete, replacing the three bespoke
memory_* events nobody consumed. Payload carries op, agent pubkey (seed
beside memfs), machine instance (machined-first), paths, head commit,
branch — enough for a federated peer to know to fetch. Best-effort:
missing identity warns and ships null, never blocks the write.
MemoryRepo stays a pure store; grew head_commit_hex/current_branch.
2026-07-16 11:07:32 -04:00
Fimeg
116562a615 machined: MachineSigner — server signs as the machine without holding the key
All machine-seed consumers now resolve identity machined-first with a
loud legacy fallback, and none of them generate. Federation envelopes
are signed through MachineSigner with domain separation
(souveraine-machined:v1:federation-envelope:...) so the wire format is
identical whichever tier holds the key; verify reconstructs the same
frame. Unsignable events are dropped loudly, never sent unsigned.
identity show/sign are load-only now — reading an identity must not
mint one. Round-trip + tamper tests on the envelope.
2026-07-16 10:24:14 -04:00
Fimeg
5039163a52 machined: system-tier machine identity daemon
The machine seed moves out of the user session: souveraine-machined owns
/var/lib/souveraine/seed-id as the souveraine system user and serves
pubkey/sign over /run/souveraine/machined.sock (SO_PEERCRED logged,
domain-separated signatures, group-gated socket). Seed is a precondition
- provision via 'souveraine machine init --fresh|--migrate-from', the
daemon never generates. reach/consult now resolves the machine key
through the daemon with a loud legacy fallback. Hardened system unit +
sysusers shipped in the Arch package.
2026-07-16 10:08:33 -04:00
Fimeg
04a8390e8d secrets: org.freedesktop.secrets daemon rooted in the machine SeedId
souveraine-secrets (feature 'secrets', own bin target) backs libsecret
clients — Chatty/libcmatrix and our keyring-core store — without
gnome-keyring or KWallet. Implements the dh-ietf1024-sha256-aes128-cbc-pkcs7
session transport (zbus/hkdf/aes-cbc, MODP-1024 via num-bigint) plus
collection/item/session objects and the store. SeedId::load() is the strict
no-generate counterpart to load_or_generate: the daemon treats identity as a
precondition and fails loudly if none exists.
2026-07-16 08:06:20 -04:00
Fimeg
72b01457d2 quickshell: restore ii-stock config keys the fork dropped
Config.qml regained sidebar.width/widthExtended (their absence collapsed
the right sidebar PanelWindow to 1px — 'unclickable' on the laptop), plus
lock.dpmsTimeout, lock.unlockHook, and autoIdleInhibit with its Idle.qml
property. Audio.qml's absent capture source is now a zero-volume stub so
stock consumers stop dereferencing null, and the pactl status parse runs
under LC_ALL=C. volumeMixer dialog content comes along for the sidebar.
Findings logged in SouveraineOS/docs/DUMP-power-idle-lock-2026-07-15.md.
2026-07-16 08:06:11 -04:00
Fimeg
0f50a3e9c5 docs: quickshell design docs moved to SouveraineOS/docs
They're cross-surface (laptop + phone) OS docs, not shell-tree internals.
Live copies now in ~/Projects/SouveraineOS/docs/ alongside
SESSION-AUTHORITY-DOCTRINE.md and the session dumps.
2026-07-16 08:05:59 -04:00
Fimeg
6532572b8d fix: Ai.qml missing 'import qs' — GlobalStates ReferenceError crashed lock redaction
The lock-time redaction Connections block referenced GlobalStates but
Ai.qml never imported the root qs module, so every screenLocked change
threw ReferenceError inside the handler — taking the lock surface down.
2026-07-14 22:26:19 -04:00
Fimeg
13cded0087 fix: Timer not available in functions module, use Process instead 2026-07-14 22:15:10 -04:00
Fimeg
e17f02b030 fix: add missing QtQuick import to Session.qml (Timer needs it) 2026-07-14 22:05:46 -04:00
Fimeg
bc0814939e fix: add missing pragma Singleton to SessionAudit.qml 2026-07-14 22:01:45 -04:00
Fimeg
10c206c09c fix: Component.onCompleted doesn't work on QML Singletons
Replaced with Timer { interval: 0; running: true } in:
- Session.qml (boot IPC audit)
- SessionAudit.qml (init log)
- SessionEvents.qml (init log)
2026-07-14 21:58:02 -04:00
Fimeg
ffe4157e1c settings: show sleep inhibitor state, update stage names
IdleConfig.qml now shows:
- Full IdleCoordinator state names including Suspending/Asleep/Waking
- Sleep inhibitor held/released status (from SessionEvents)
- stepUp grant TTL presence

hypridle.conf changes (NOT in repo — apply to ~/.config/hypr/):
- lock_cmd simplified to loginctl lock-session (SessionEvents catches
  the Lock signal); hyprlock fallback if quickshell is down
- before_sleep_cmd REMOVED — SessionEvents handles PrepareForSleep
- inhibit_sleep REMOVED — SessionEvents holds the delay inhibitor
- suspend_cmd prefers loginctl over systemctl for PrepareForSleep signal
2026-07-14 21:39:01 -04:00
Fimeg
ae9ef41bb1 hash-chained audit trail for session transitions
SessionAudit.qml — tamper-evident JSONL log of all session state changes:
- Lock/unlock, secure/insecure transitions
- Idle state machine transitions (active/dimmed/lock/sleep/wake)
- PrepareForSleep, external lock signals, inhibitor lifecycle
- Step-up auth success/failure, break-glass issued/consumed/expired
- Grant expiry and revocation

Hash chain: each entry includes md5 of previous entry. Sequence numbers
detect gaps. Chain is validated on startup from the last entry.

Uses Qt.md5() (not SHA256 — not available in QML). Advisory tamper-
evidence, not cryptographic security. Log at:
~/.local/share/souveraine/session-audit.jsonl
2026-07-14 21:31:23 -04:00
Fimeg
377b82999d break-glass: one-time emergency grant with journaling
StepUpAuth.breakGlass(actionFamily, reason):
- Requires a non-empty reason (logged prominently)
- 60-second TTL (not the normal 5 minutes)
- One-time: consumed on use via isBreakGlass()
- Cannot be issued while session is locked
- Cleared on lock (fail-closed)
- Tracked separately from normal grants for audit

Souveraine.send() now checks break-glass before blocking on step-up.
Break-glass bypasses normal PAM auth — the user declared an emergency.
2026-07-14 21:24:57 -04:00
Fimeg
61bdc5360f session trust: step-up send gating + lock-time response redaction
Step-up send gating:
- Souveraine.send() returns 'step-up' when auth is required
- Ai.sendUserMessage() triggers StepUpAuth.requestAuth('send') on
  step-up, retries on success, shows message on failure
- Extracted _startStreaming() helper for reuse after auth retry

Lock-time response redaction:
- Ai.qml watches GlobalStates.screenLocked
- On lock mid-stream: replaces displayed content with '[content hidden
  until unlock]', preserves rawContent for post-unlock display
- Enforces SESSION-TRUST-ARCHITECTURE.md requirement: lock during
  personal agent output hides it

Trust boundary matrix updated.
2026-07-14 21:13:50 -04:00
Fimeg
a8fd510dc7 session trust phase 1: logind ingress, sleep inhibitor, step-up auth
Phase 1 of the SouveraineOS homogenization — the three highest-priority
gaps from the session trust architecture:

New files:
- services/SessionEvents.qml — logind event ingress (PrepareForSleep,
  session Lock signal) via gdbus monitor; delay-mode sleep inhibitor
  held from startup, released only after WlSessionLock.secure
- services/StepUpAuth.qml — step-up PAM authentication with short-lived
  in-memory grants per action family; revokes on lock/timeout/failure
- TRUST-BOUNDARY-MATRIX.md — every session operation classified by
  caller type, auth gate, and enforcement status

Modified:
- IdleCoordinator: extended with Suspending/Asleep/Waking states for
  the sleep lifecycle; wires to SessionEvents when present
- Session.qml: added sleep inhibitor kind, stepUp/sleepInhibitor
  state in IPC projection, boot-time IPC audit log
- Config.qml: added lock.stepUp config section (enabled, grantTtlMs)
- LockConfig.qml: added step-up authentication settings section
- deploy.sh: added SessionEvents and StepUpAuth to manifest
- SESSION-TRUST-ARCHITECTURE.md: marked phase 1 items as done
- REFERENCE-EXTRACTION.md: marked build order items as done
2026-07-14 20:48:46 -04:00
Fimeg
4d5690b547 quickshell: Idle & sleep settings page
Live idle stage readout (polled over session IPC), the native-coordinator
toggle, and dim/lock timers. Timers grey out while the coordinator is off.
2026-07-14 20:17:43 -04:00
Fimeg
e31c3aaf62 quickshell: first-party lock/nav/session layer, retire the pill
Grows Souveraine's own surfaces on top of the borrowed ii shell and drops
the separate pill shell in favor of one integrated navigation rail.

Session arbiter (functions/Session.qml): probe logind's Can* methods over
busctl instead of guessing from installed binaries -- the answer carries the
polkit tier (yes/challenge/na), so a swapless phone reports hibernate as na
and refuses honestly rather than firing a verb that no-ops. Verbs run through
a Process that logs exit codes and tracks lastAction; refusals log too. The
busctl output is parsed with awk, not a sed regex buried under four escaping
layers -- the sed version returned nothing on the phone and left every
capability stuck at "unknown" (invisible on the laptop, where timing masked
it). Every structured result is JSON-over-string; quickshell maps a var
return to void.

Lock trust: screenLocked (the shell's lock request) is now distinct from
screenLockSecure (WlSessionLock.secure, the compositor's acknowledgement,
mirrored from LockScreen). Cards that disclose personal data gate on secure,
not on a button press. LockContentPolicy centralizes the ambient/personal/
step-up tiers so no card grows its own private rule.

New first-party namespace modules/souveraine/: LockMediaCard, LockSurfaceHost,
SystemGestureRail -- owned surfaces, not ii patches. IdleCoordinator gives one
staged idle vocabulary (dim/lock) gated behind nativeCoordinatorEnabled, off
until the native Wayland idle-notify is verified on the Pixel compositor;
hypridle stays the adapter. WallpaperAssets selects aspect-aware variants for
phone-vs-laptop display shapes.

Pill retired: pill/shell.qml and PillConfig gone, replaced by NavigationConfig
and the gesture rail. Hyprland starts qs -c souveraine directly; no secondary
shell, no qsConfig flip.

Verified on the phone: session.* reports challenge/na correctly, hibernate
and unlock refuse, inhibit round-trips with its reason.
2026-07-14 20:00:57 -04:00
Fimeg
cecde3bac2 quickshell: session arbiter + fix IPC returns silently dropping payloads
Fork ii's Session singleton and add a sessionctl.* surface.

The IPC bug is the important half. Quickshell marshals exactly five types
(string/int/bool/double/color) and maps a `var` return to VOID, discarding
the payload with no error -- src/io/ipc.cpp, "void and var get mixed by qml
engine". dock.*, shell.* and apps.* were all declared `: var`, so they
registered as `(): void` and returned nothing at all. The {ok, reason}
contract has never once reached a caller. All of them now return JSON as a
string, which is what actually crosses the socket.

Session: upstream fires `systemctl X || loginctl X` detached and throws the
exit code away. Fine on a desktop with someone at the keyboard, not fine on
a phone where the shell is the session manager and a verb that silently does
nothing leaves you believing the machine is suspending when it isn't. So:
probe loginctl/systemctl/hibernate once instead of assuming, run verbs
through a Process that logs the exit code, and refuse honestly when the
machine can't do the thing (the phone has no swap -- hibernate now says so
instead of no-opping). Every upstream verb keeps its name and call sites.

Inhibits carry a mandatory reason and get a cookie; state() lists who is
holding the machine awake and why. "Why didn't it sleep" is now answerable.
unlock() is refused by design -- the lock is the credential gate, so no IPC
caller routes around the PIN pad.

Named sessionctl, not session: ii's SessionScreen already owns "session",
and quickshell drops duplicate targets silently rather than erroring.

Idle: drop the 2>/dev/null and run hypridle through a Process, so a unit
that fails to come back is a log line instead of a flat battery.

Verified on the laptop: inhibit stops hypridle, uninhibit brings it back.
2026-07-14 18:31:59 -04:00
Fimeg
c78c5510af quickshell: run as qs -c souveraine + dock/shell/apps method surfaces
Own config name composed by deploy.sh from our files + pristine-ii dir
borrows; ii tree stays untouched. One SouveraineFamily, two modes gated
on souveraine.phone.

Three guarded IPC surfaces for the agent (via Souveraine's harness, not
a new integration): dock.manifest/pin/unpin/restack, shell.surfaces/state
(layer registry, live-derived), apps.list/get/find/categories (.desktop
scan). Refusals are result shapes, not errors.

Settings app split into per-domain pages (Device/Lock/Dock/Pill/Keyboard).
Config backports (background.widgets, claudeUsage, fileSearch) kill the
laptop TypeErrors.
2026-07-14 15:03:07 -04:00
Fimeg
72f5169458 quickshell: touch PIN lock screen for the phone
The OSK is layershell and can't rise above a session lock, so the lock
surface carries its own keypad. Lock state persists to states.json so a
qs crash while locked comes back locked; with lock.launchOnStartup the
lock screen is the greeter (greetd autologins straight into Hyprland).
Keypad gated behind lock.touchKeypad so desktop deploys keep the stock
surface.
2026-07-13 15:19:59 -04:00
Fimeg
620c6778ce delivery: separate phone and laptop surface profiles 2026-07-13 13:11:31 -04:00
Fimeg
79f3b2fa4b delivery: scope safe QuickShell surface adoption 2026-07-13 13:01:31 -04:00
Fimeg
048f180105 docs: bootstrap private pacman archive securely 2026-07-12 22:46:37 -04:00
Fimeg
c8c72ecbf2 ci: split signed pacman databases by architecture 2026-07-12 22:19:44 -04:00
Fimeg
16ba8cfbf4 docs: bootstrap pacman from local Gitea 2026-07-12 21:58:02 -04:00
Fimeg
4427389d9c ci: authenticate ArchDev source clone 2026-07-12 21:45:46 -04:00
Fimeg
29e204e56e ci: restore strict clippy gate 2026-07-12 21:38:16 -04:00
Fimeg
f52edd402b ci: use local Gitea token for tuie 2026-07-12 21:28:58 -04:00
Fimeg
e0d742d797 ci: authenticate pinned tuie clones 2026-07-12 21:26:08 -04:00
Fimeg
3a83666ef5 ci: sign multi-architecture package repository 2026-07-12 21:11:34 -04:00
Fimeg
e0c8128832 ci: publish aarch64 pacman package artifacts 2026-07-12 20:57:00 -04:00
Fimeg
ffa8b498a3 build: make aarch64 linker sysroot-safe 2026-07-12 18:00:31 -04:00
Fimeg
e5813ab6c9 quickshell: make conversation resume explicit 2026-07-12 16:58:59 -04:00
Fimeg
cf2ba25089 quickshell: render subconscious surfacing once 2026-07-12 16:35:44 -04:00
Fimeg
6e21c50dcc quickshell: resume agent conversations from server 2026-07-12 16:31:55 -04:00
Fimeg
a2731b418e identity: add signed node commission records 2026-07-12 15:39:40 -04:00
Fimeg
2c14da0dbe federation: document node enrolment trust boundary 2026-07-12 15:34:41 -04:00
Fimeg
ad56206294 track cross-build cargo config + souveraine user unit
.cargo/config.toml + aarch64-pkg-config wrapper are load-bearing for the
cross build (CI artifact job + local build-cross.sh both depend on them);
were gitignored before. souveraine.service is the systemd user unit the
packaging/deploy scripts template.
2026-07-12 14:57:19 -04:00
Fimeg
ec7c4e8e8c quickshell: dock geometry/icon-centering, GlobalStates, ConflictKiller service
Dock + pill z-order and icon centering pass; GlobalStates.qml and a
ConflictKiller service for the ii sidebar.
2026-07-12 14:56:56 -04:00