@tryinget/pi-activity-strip 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -128,9 +128,11 @@ The shortcut toggles exclusive keyboard mode. On entry, the first card is select
128
128
  - **Hidden tabs:** a Ghostty window title only names its active tab. A bound surface whose title is not visible is placed through its Ghostty host process: one host window is exact containment; several host windows use the window remembered for that tab. Memory comes from titles seen while the strip runs and from a read-only AT-SPI inventory of tab labels, and is persisted per Niri instance under `~/.pi/agent/state/pi-activity-strip/surface-bindings.json`. A tab whose window has never been observed stays unplaced rather than guessed; `status` reports that count. Activating a hidden-tab card calls the host process's `present-surface` action on the session bus, then focuses the window, and reports success only after the title proves the tab is visible.
129
129
  - **Window ids:** agents and tools name windows by their Niri window id (`claude-window` prints `window_id`, continuity receipts carry it). Each card shows that id as a quiet `#43` chip at the start of its footer; a hidden tab has no window of its own, so its chip shows the window hosting it. Hover or keyboard detail adds a `window` row with the workspace number the operator sees, Niri's workspace `idx` and never its internal workspace id, for example `#43 · workspace 2` or `host #43 · workspace 2` for a hidden tab. The tooltip and accessible label name the window too. Off Niri there is no window id, so no chip is drawn.
130
130
  - **Agent tabs:** a tab is admitted as an agent when the process owning its terminal is a recognized agent CLI, never on a window title alone, so plain terminal programs are not cards. Claude Code tabs are identified exactly through the per-session scratchpad the process holds open, which yields the session id and the title Claude Code put on the terminal; that title places the tab in its window and is remembered so the tab stays placed once hidden.
131
- - **AK task references:** cards can show the Agent Kernel task their session is working on. The controller reads the read-only `ak` CLI (`ak task list --status claimed --format json --all --verbose` and `ak task deferred --format json --all`) on a calm 15-second clock and joins claims by exact Pi session id under the AK5700 claim semantics: only `session-<uuid>` claims count, and an expired lease is vacant custody that renders nothing. A card whose session holds a live claim shows a clickable `AK #id · title` chip that reuses the card's own activation, so clicking it focuses the exact Ghostty window of the claiming session, presenting hidden tabs first. Claims whose lease has not lapsed but whose claiming session no longer exists ("claim outlives session") and tasks carrying an active deferral are joined by task repo onto cards working inside that repo and render as inert badges, never buttons — there is no live window to focus and no AK action is ever offered. Ambiguous session matches (one logical session resumed into two terminals), a missing `ak` binary, or malformed output bind nothing: fail closed, no chip, no invented state, strip behavior unchanged. The strip never writes AK state and never touches the society database directly.
131
+ - **AK task references:** cards can show the Agent Kernel task their session is working on. The controller reads the read-only `ak` CLI (`ak task list --status claimed --format json --all --verbose` and `ak task deferred --format json --all`) on a calm 15-second clock and joins claims by exact Pi session id under the AK5700 claim semantics: only `session-<uuid>` claims count, and an expired lease is vacant custody that renders nothing. Chips sit in the card's footer as bare task numbers (`AK5701`, title in the tooltip and the expanded inspector), one per card with the rest folded into a `+N` count, so the folder name keeps the header. A card whose session holds a live claim shows a clickable chip that reuses the card's own activation, so clicking it focuses the exact Ghostty window of the claiming session, presenting hidden tabs first. Claims whose lease has not lapsed but whose claiming session no longer exists ("claim outlives session") and tasks carrying an active deferral are joined by task repo onto cards working inside that repo and render as inert badges, never buttons — there is no live window to focus and no AK action is ever offered. Ambiguous session matches (one logical session resumed into two terminals), a missing `ak` binary, or malformed output bind nothing: fail closed, no chip, no invented state, strip behavior unchanged. The strip never writes AK state and never touches the society database directly.
132
132
  - **Codex telemetry:** Codex keeps a thread index naming every session's rollout file, working directory and title. A process binds to its thread by an open rollout descriptor, or, before any task has run, by being the only session created in that directory after the process started; anything ambiguous binds nothing. The rollout tail then reports the running tool and its command, turn count, approval and sandbox policy, prompt and reply. Reading the index needs the runtime's built-in SQLite, and a host without it degrades to a process-only card.
133
133
  - **Claude Code telemetry:** cards read live state from the tail of the session transcript, giving the topic, current tool and its target, last prompt, latest reply, turn count and activity clock with no configuration. That format is internal to Claude Code and can change between releases, so a transcript that no longer parses degrades to a process-only card rather than inventing activity. Optional hooks add the one state a transcript cannot express, that a session is blocked waiting for you; run `claude-hooks` for the settings fragment. Only low-frequency events are hooked, so nothing runs per tool call. OpenTelemetry is deliberately not used: it reports aggregate usage and cost, not which tool a session is running now.
134
+ - **You are here:** the block at the ribbon's left names the focused window's project in large type with its folder beneath (home written as `~`, cut from the front so the deepest folder stays visible), and the matching card carries a solid accent ring. With no agent window focused it shows the session counts instead.
135
+ - **Window list and jump by number:** whenever the ribbon is expanded (a hovered card, or a typed number) the brand column shows a list of every agent window on every workspace, alphabetically by project, one line each: the project name, its workspace (`ws2`) and its Niri window number (`#432`), with the window you are in ringed. The card row scrolls to keep the focused window's card in view as Niri focus moves. Hovering the brand column itself is an overview: every card on the ribbon opens its details at once, while hovering a single card opens just that one. Hovering takes the keyboard so a number can be typed at once. Leaving the ribbon hands it straight back and closes the list, and so do 3 seconds without a key while nothing is typed, so a pointer resting on the ribbon cannot keep swallowing typing meant for the window below; a click on the ribbon takes it again. Typing narrows the list by project name (any part, any case: `ext` finds `pi-extensions`) or by window number; the row Enter will open is highlighted. Enter on a number jumps to the listed window with that number, else to a project whose name contains the digits, else to exactly that number (one with no live window moves nothing and says so); Enter on a name opens the first match like clicking it; Backspace edits and Escape closes. While only hover holds the keyboard (no click, not keyboard mode), a number reaches only a listed agent window, and a key that cannot be part of a search (space, Tab, arrows, a Ctrl/Alt/Super shortcut) or Enter on something matching nothing cancels the search, closes the list and hands the keyboard back, so most typing meant for the window below does not turn into a jump. A short command that happens to be part of a project name (`pi` + Enter) still opens that project; that is the price of name search on hover. Clicking an entry focuses it like its card, presenting a hidden tab first. In keyboard mode (`pi-activity-strip focus-strip`) typing a digit opens the list directly. After any jump the ribbon gives the keyboard back at once.
134
136
  - **Appearance:** the ribbon reads the same theme files Ghostty reads. It resolves the `theme` setting for the desktop's current colour scheme, including the `light:…,dark:…` form, and takes colours set directly in the config over the theme file, exactly as Ghostty layers them. State colours reuse the terminal's own meanings, so green is settled, yellow is working, red failed, and the cursor colour marks a session waiting for you. The panel derives every shade from eight named colours, so a theme change is a handful of values and one stylesheet reload rather than a restart. A theme that cannot be read falls back to a neutral palette.
135
137
  - **Height repair:** showing or hiding the ribbon changes the output working area, and a window whose height is not automatic keeps the old value. After each change the strip compares window heights before and after, and resets to automatic only those windows still sitting at a height the moving windows just vacated. A height nobody vacated is never touched, each window is reset at most once per height, and a pass is bounded.
136
138
  - **Two identity keys:** a Ghostty surface id is a per-process handle that can drift away from the value a long-lived Pi process captured at startup, while the 32-hex session token in the same title never does. Memory therefore stores both, and lookups prefer the exact surface. A session token that two windows claim is ambiguous and binds nothing; two terminals resuming one logical session in the same window are both placed there.
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "schema": "pi-activity-strip-native-artifact.v1",
3
3
  "target": "x86_64-unknown-linux-gnu",
4
- "sha256": "ebf9743947de5c872c3a5accf11bda013de71d081231d8e0f2fea83668227f74",
4
+ "sha256": "575cd45de37a3f5670d062f978d70a65f9b9db908136528d46d419fcc491fcd0",
5
5
  "cargoLockSha256": "f8ebc11bc721c569af982169e448a5ea4fed15bc06001017d97acda22b1c890b",
6
- "sourceSha256": "f11355a34e72715d086297217d9cc3caabb81b6dcf3deb1c0c798f3a890f7a33",
6
+ "sourceSha256": "94b019017ebe22b0e10511a996a0d878a5f7139259c70715dd53b9cbd1cbb087",
7
7
  "rustc": "rustc 1.98.0 (88d9e12ae 2026-08-18)",
8
8
  "glibcFloor": "GLIBC_2.34",
9
9
  "neededSonames": [
10
10
  "libgtk4-layer-shell.so.0",
11
11
  "libgtk-4.so.1",
12
12
  "libcairo.so.2",
13
+ "libgraphene-1.0.so.0",
13
14
  "libgio-2.0.so.0",
14
15
  "libgobject-2.0.so.0",
15
16
  "libglib-2.0.so.0",