patches: queue 0005, mount the agent island
This commit is contained in:
parent
b21184217e
commit
d87d6117a4
2 changed files with 143 additions and 0 deletions
|
|
@ -0,0 +1,101 @@
|
|||
From a5314f17f9c9356d5e57212bd077702a4a0ba0dc Mon Sep 17 00:00:00 2001
|
||||
From: Souveraine <souveraine@wiuf.net>
|
||||
Date: Tue, 11 Aug 2026 14:22:01 -0400
|
||||
Subject: [PATCH] bar: mount the agent island
|
||||
|
||||
Registers AgentSessions as a service singleton, adds its config block, mounts
|
||||
Island in the Souveraine-owned UtilButtons (so it lands on both device bars
|
||||
without forking BarContent twice), and adds the five new files to the deploy
|
||||
manifest.
|
||||
|
||||
Activating change: reloads the shell.
|
||||
---
|
||||
surfaces/quickshell/deploy.sh | 5 +++++
|
||||
surfaces/quickshell/modules/common/Config.qml | 11 ++++++++++-
|
||||
surfaces/quickshell/modules/ii/bar/UtilButtons.qml | 14 ++++++++++++++
|
||||
surfaces/quickshell/services/qmldir | 1 +
|
||||
4 files changed, 30 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/surfaces/quickshell/deploy.sh b/surfaces/quickshell/deploy.sh
|
||||
index 3b1baa1..a111b99 100755
|
||||
--- a/surfaces/quickshell/deploy.sh
|
||||
+++ b/surfaces/quickshell/deploy.sh
|
||||
@@ -81,6 +81,11 @@ services/WallpaperAssets.qml souveraine/services/WallpaperAssets.qml
|
||||
services/WallpaperDownload.qml souveraine/services/WallpaperDownload.qml
|
||||
scripts/wallpaper/download_wallhaven.sh souveraine/scripts/wallpaper/download_wallhaven.sh
|
||||
services/ConflictKiller.qml souveraine/services/ConflictKiller.qml
|
||||
+services/AgentSessions.qml souveraine/services/AgentSessions.qml
|
||||
+scripts/agent/agent-sessions.sh souveraine/scripts/agent/agent-sessions.sh
|
||||
+modules/souveraine/island/Island.qml souveraine/modules/souveraine/island/Island.qml
|
||||
+modules/souveraine/island/IslandExpansion.qml souveraine/modules/souveraine/island/IslandExpansion.qml
|
||||
+modules/souveraine/island/qmldir souveraine/modules/souveraine/island/qmldir
|
||||
services/SessionEvents.qml souveraine/services/SessionEvents.qml
|
||||
services/SessiondBridge.qml souveraine/services/SessiondBridge.qml
|
||||
services/SessiondPolicy.qml souveraine/services/SessiondPolicy.qml
|
||||
diff --git a/surfaces/quickshell/modules/common/Config.qml b/surfaces/quickshell/modules/common/Config.qml
|
||||
index bbb7ee4..31e1dbb 100644
|
||||
--- a/surfaces/quickshell/modules/common/Config.qml
|
||||
+++ b/surfaces/quickshell/modules/common/Config.qml
|
||||
@@ -220,7 +220,16 @@ Singleton {
|
||||
property string text: ""
|
||||
}
|
||||
}
|
||||
- property JsonObject weather: JsonObject {
|
||||
+ // TASK-69/70: one collector for every agent session
|
||||
+ // (Souveraine, Claude Code, Codex). Replaces per-provider
|
||||
+ // fetches; claudeUsage above stays for the subscription gauge
|
||||
+ // until stage 3 folds its OAuth poll in here.
|
||||
+ property JsonObject agentSessions: JsonObject {
|
||||
+ property bool enable: true // Show the agent island in the bar
|
||||
+ property int refreshInterval: 60 // seconds
|
||||
+ property int windowMinutes: 1440 // How far back counts as "a session"
|
||||
+ }
|
||||
+ property JsonObject weather: JsonObject {
|
||||
property bool enable: false
|
||||
property string placementStrategy: "free" // "free", "leastBusy", "mostBusy"
|
||||
property real x: 400
|
||||
diff --git a/surfaces/quickshell/modules/ii/bar/UtilButtons.qml b/surfaces/quickshell/modules/ii/bar/UtilButtons.qml
|
||||
index 7ba0095..d06ba12 100644
|
||||
--- a/surfaces/quickshell/modules/ii/bar/UtilButtons.qml
|
||||
+++ b/surfaces/quickshell/modules/ii/bar/UtilButtons.qml
|
||||
@@ -2,6 +2,7 @@ import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
+import qs.modules.souveraine.island
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
@@ -20,6 +21,19 @@ Item {
|
||||
spacing: 4
|
||||
anchors.centerIn: parent
|
||||
|
||||
+ // Agent island (TASK-70). Mounted here rather than in BarContent
|
||||
+ // deliberately: UtilButtons is already a Souveraine-owned override,
|
||||
+ // so the island lands on BOTH device bars without forking the 13.8K
|
||||
+ // BarContent twice (ii-base and ii-phone) and carrying that
|
||||
+ // divergence against the pin. The island narrows itself - dot on the
|
||||
+ // phone bar, pill on the desktop - so one mount serves both.
|
||||
+ Loader {
|
||||
+ Layout.alignment: Qt.AlignVCenter
|
||||
+ active: Config.options.bar.agentSessions?.enable ?? true
|
||||
+ visible: active
|
||||
+ sourceComponent: Island {}
|
||||
+ }
|
||||
+
|
||||
Loader {
|
||||
active: Config.options.bar.utilButtons.showScreenSnip
|
||||
visible: Config.options.bar.utilButtons.showScreenSnip
|
||||
diff --git a/surfaces/quickshell/services/qmldir b/surfaces/quickshell/services/qmldir
|
||||
index 0e63101..1882c7d 100644
|
||||
--- a/surfaces/quickshell/services/qmldir
|
||||
+++ b/surfaces/quickshell/services/qmldir
|
||||
@@ -1,4 +1,5 @@
|
||||
BooruResponseData 1.0 BooruResponseData.qml
|
||||
+singleton AgentSessions 1.0 AgentSessions.qml
|
||||
singleton Ai 1.0 Ai.qml
|
||||
singleton AppSearch 1.0 AppSearch.qml
|
||||
singleton Audio 1.0 Audio.qml
|
||||
--
|
||||
2.55.0
|
||||
|
||||
|
|
@ -39,3 +39,45 @@ again.
|
|||
otherwise. Say which: verified / reasoned / untested.
|
||||
- Applied patches get deleted from this directory in the same commit that
|
||||
applies them. This directory is a queue, not an archive — git keeps history.
|
||||
|
||||
## In the queue
|
||||
|
||||
### 0005 — mount the agent island (TASK-69 + TASK-70)
|
||||
|
||||
The four **activating** edits for the agent-session work. Everything the patch
|
||||
switches on already landed inert in `47ce2d1` / `b211842`:
|
||||
`scripts/agent/agent-sessions.sh`, `services/AgentSessions.qml`,
|
||||
`modules/souveraine/island/`.
|
||||
|
||||
Touches: `services/qmldir` (register the singleton),
|
||||
`modules/common/Config.qml` (`bar.agentSessions` block),
|
||||
`modules/ii/bar/UtilButtons.qml` (mount), `deploy.sh` (manifest).
|
||||
|
||||
Mounted in `UtilButtons` rather than `BarContent` on purpose: UtilButtons is
|
||||
already a Souveraine-owned override, so the island reaches **both** device bars
|
||||
without forking the 13.8K `BarContent` twice (ii-base *and* ii-phone) and
|
||||
carrying that divergence against the pin. The island narrows itself — dot on a
|
||||
cramped bar, pill where there is room — from the same threshold BarContent uses.
|
||||
|
||||
**Status: verified / reasoned / untested — in that order, per piece.**
|
||||
|
||||
- *Verified*: the collector. Run by hand against real data — 0.47 s, valid
|
||||
JSON, exit 0, correctly identifies this very conversation as a live session.
|
||||
Two bugs found and fixed by running it rather than reading it: jq's
|
||||
`fromdateiso8601` rejects the fractional seconds all three providers emit
|
||||
(every session read "idle"), and the Codex id was the date prefix, not the uuid.
|
||||
- *Verified*: syntax. `qmllint` exit 0 on all four QML files — using
|
||||
**`/usr/lib/qt6/bin/qmllint`**, not `/usr/bin/qmllint`, which is a Qt5 binary
|
||||
that prints nothing and cannot be trusted as a gate. Proven by feeding it a
|
||||
deliberately broken file first.
|
||||
- *Reasoned*: the mount point, the device-form split, the degradation policy.
|
||||
- *Untested*: **nothing has rendered.** No shell has loaded this. `qmllint`
|
||||
cannot resolve `qs.*` imports from the repo, so property-level mistakes
|
||||
(a wrong `Appearance` key, a missing `StyledToolTip` property) will only
|
||||
appear at load.
|
||||
|
||||
Lint the **composed** tree, not the repo, for a stronger check:
|
||||
`~/.config/quickshell/souveraine/` after `deploy.sh`.
|
||||
|
||||
If it does not come up: `git reset --hard HEAD~1`. The three inert commits are
|
||||
safe to keep either way — nothing imports them until this patch lands.
|
||||
|
|
|
|||
Loading…
Reference in a new issue