Watch
1
0
Fork
You've already forked souveraine
0
souveraine/surfaces/quickshell
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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
..
modules quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
panelFamilies quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
services quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
deploy.sh quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
GlobalStates.qml quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
HOW-IT-WORKS.md quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
INTERFACE-ARCHITECTURE.md quickshell: run as qs -c souveraine + dock/shell/apps method surfaces 2026-07-14 15:03:07 -04:00
README.md surfaces/quickshell: bring the phone shell under the surface tree 2026-07-12 08:57:10 -04:00
REFERENCE-EXTRACTION.md quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
SESSION-TRUST-ARCHITECTURE.md quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
SETTINGS-APP-PLAN.md quickshell: run as qs -c souveraine + dock/shell/apps method surfaces 2026-07-14 15:03:07 -04:00
settings-launch.sh quickshell: run as qs -c souveraine + dock/shell/apps method surfaces 2026-07-14 15:03:07 -04:00
settings-phone.qml quickshell: first-party lock/nav/session layer, retire the pill 2026-07-14 20:00:57 -04:00
shell.qml quickshell: run as qs -c souveraine + dock/shell/apps method surfaces 2026-07-14 15:03:07 -04:00
souveraine-settings.desktop quickshell: run as qs -c souveraine + dock/shell/apps method surfaces 2026-07-14 15:03:07 -04:00

Souveraine quickshell surface

The desktop shell as a Souveraine surface — the primary visual frontend for SouveraineOS, with the TUI remaining the dive-in instrument.

Architecture

  • services/Souveraine.qml — the substrate singleton. The ONE server connection every shell module hangs off: agent inventory, conversation lifecycle, the SSE turn stream (raw events re-emitted via streamEvent(var)), the backchannel (cancelTurn() / interject(text)), and the desktop sensorium — every send carries ambient context (active window, open apps, cursor position) so she perceives the room she is being spoken to in. Device sensors (SouveraineOS positional data from the Pixel 3 kernel path) extend collectAmbient().
  • services/Ai.qml — ii-compat adapter. Keeps the API the illogical-impulse sidebar expects; owns no transport. Shapes wire events into the message objects the existing chat UI renders.
  • modules/ (coming) — presence (portrait PNGs from memfs, posture state machine), cockpit (subconscious pane), agents (masterdetail manager), settings, schedules. Each subscribes to the Souveraine singleton.

What changes

  • "Models" in the sidebar are Souveraine agents (GET /v1/agents). Picking one starts a conversation with that agent — memory, sensors, subconscious and all.
  • Messages stream over the server's SSE endpoint (POST /v1/conversations/:id/messages), authenticated with the agent's bearer token from ~/.souveraine/server/agents/<id>/api_token.
  • Subconscious surfacings, reflection, and archivist pressure render in the chat as interface notes (dedicated widgets later).
  • Reasoning and sensor activity render inside collapsible <think> blocks.
  • Keys/providers/temperature are owned by souveraine.toml — the sidebar's /key and /temp commands now just point there. The keyring path is dead.
  • Token pressure is fetched after each turn from GET /v1/conversations/:id/tokens.

Portability (KDE / non-Hyprland)

Souveraine.qml itself is compositor-agnostic: quickshell runs on any wlroots-ish Wayland compositor and KWin; window sensing uses the foreign-toplevel protocol (KWin implements it); the cursor read tries hyprctl, then kdotool, then degrades to nothing — ambient never blocks a send. Server autostart is desktop-neutral (systemd user unit, nohup fallback), so opening any surface summons her.

What is NOT portable yet is the chrome: the chat UI is illogical-impulse's sidebar. The path for "I run KDE, can I use this?" is a standalone quickshell config (own ShellRoot + a window hosting the chat/presence modules) that ships Souveraine.qml unchanged — planned once the modules stop being ii-embedded. Same service, same mappings, different shell.

Deploy

./deploy.sh        # backs up upstream Ai.qml, symlinks ours in
./deploy.sh -u     # restore upstream

Requires the server: souveraine server (default http://127.0.0.1:8484, override with ai.souveraineUrl in the ii config).

Wire contract

The server's SSE layer is a full mirror of BackendEvent (see src/api/models.rs::StreamEvent — exhaustive From impls both ways, so a new engine event is a compile error at the seam, not a silent skip). The surface consumes the personification channel: subconscious tokens buffer and flush as one bubble when the N+1 pass ends (subconscious_pass), halts land as body signals, interstitials render by register (cenno = quiet aside, her_voice = gutter passage), primary_complete releases the input while the stream stays open for the subconscious, and context_pressure drives the live token counter. atmosphere/outfit/itinerary are logged, awaiting their shell-chrome layer.

Server-side, the backchannel and verbs exist for every surface: POST /v1/conversations/:id/cancel (interrupt, *[raised hand]* semantics), .../interject (mid-turn notes, queued between turns), GET .../messages (transcript backfill), POST .../fork (/btw side-quests). SendMessageRequest.ambient injects the sensorium note. RemoteBackend rides all of it, so TUI remote mode gained cancel/interject/ fork/resume in the same stroke.

Not yet wired

  • Sidebar UI hooks for cancel (Esc) and interject (type-while-busy) — the service functions exist, the ii chat input doesn't call them yet
  • Conversation resume in the sidebar (server verb exists; surface always starts fresh)
  • Atmosphere/outfit/itinerary driving actual shell chrome (events arrive; modules pending)
  • File/image attachments (server has an image path; surface doesn't use it yet)
  • Regenerate (Souveraine conversations are forward-only by doctrine)
  • "Blank LLM mode" — a memoryless passthrough agent for throwaway questions; needs a server-side agent flavor first
  • Dedicated widgets for surfacing/subconscious bubbles instead of interface notes