@tryinget/pi-activity-strip 0.5.0 → 0.6.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 +41 -6
- package/bin/pi-activity-strip-claude-hook.mjs +71 -0
- package/bin/pi-activity-strip.mjs +22 -1
- package/native/bin/linux-x64-gnu/artifact.json +2 -2
- package/native/bin/linux-x64-gnu/pi-activity-strip-panel +0 -0
- package/native/panel/src/app.rs +20 -20
- package/native/panel/src/card_view.rs +308 -9
- package/native/panel/src/protocol.rs +63 -0
- package/native/panel/src/runtime.rs +50 -9
- package/native/panel/src/style.css +134 -60
- package/package.json +4 -4
- package/src/common/agent-identity.mjs +163 -0
- package/src/common/ak-tasks.mjs +354 -0
- package/src/common/claude-events.mjs +190 -0
- package/src/common/claude-hook-config.mjs +56 -0
- package/src/common/claude-transcript.mjs +163 -0
- package/src/common/codex-transcript.mjs +153 -0
- package/src/common/compatibility.mjs +13 -0
- package/src/common/contracts.d.ts +26 -0
- package/src/common/contracts.ts +64 -1
- package/src/common/ghostty-present.mjs +100 -0
- package/src/common/ghostty-theme.mjs +149 -0
- package/src/common/niri-focus.mjs +179 -110
- package/src/common/session-cards.mjs +5 -2
- package/src/common/status-report.mjs +51 -0
- package/src/common/surface-bindings.mjs +234 -0
- package/src/common/terminal-identity.mjs +75 -12
- package/src/common/window-placement.mjs +59 -0
- package/src/common/workspace-view.mjs +161 -0
- package/src/native/agent-discovery.mjs +294 -0
- package/src/native/ak-runtime.mjs +164 -0
- package/src/native/codex-discovery.mjs +128 -0
- package/src/native/ghostty-tab-inventory.py +99 -0
- package/src/native/height-repair.mjs +154 -0
- package/src/native/main.mjs +120 -14
- package/src/native/panel-projection.mjs +67 -5
- package/src/native/placement.mjs +225 -0
- package/src/native/tab-inventory.mjs +188 -0
- package/src/native/theme-runtime.mjs +72 -0
- package/src/native/theme-source.mjs +197 -0
- package/src/native/workspace-events.mjs +16 -1
|
@@ -6,12 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Trigger focused-workspace reconciliation immediately from Niri's event
|
|
9
|
-
* stream while retaining the slower poll as a fail-closed fallback.
|
|
9
|
+
* stream while retaining the slower poll as a fail-closed fallback. Window
|
|
10
|
+
* open/change/close and focus events are forwarded so title changes that reveal
|
|
11
|
+
* a Ghostty tab, or windows moving between workspaces, are seen between polls.
|
|
10
12
|
* @param {{
|
|
11
13
|
* spawn: typeof import("node:child_process").spawn;
|
|
12
14
|
* env: NodeJS.ProcessEnv;
|
|
13
15
|
* onFocusedWorkspace: (workspaceId: number) => void;
|
|
14
16
|
* onFallback: () => void;
|
|
17
|
+
* onWindowChanged?: (window: Record<string, unknown>) => void;
|
|
18
|
+
* onWindowClosed?: (windowId: number) => void;
|
|
19
|
+
* onWindowFocusChanged?: (windowId: number | null) => void;
|
|
15
20
|
* fallbackMs: number;
|
|
16
21
|
* setIntervalFn?: typeof setInterval;
|
|
17
22
|
* clearIntervalFn?: typeof clearInterval;
|
|
@@ -52,6 +57,16 @@ export function createNiriWorkspaceEventWatcher(options) {
|
|
|
52
57
|
lastFocusedWorkspaceId = activation.id;
|
|
53
58
|
options.onFocusedWorkspace(activation.id);
|
|
54
59
|
}
|
|
60
|
+
const changedWindow = event?.WindowOpenedOrChanged?.window;
|
|
61
|
+
if (changedWindow && typeof changedWindow === "object") {
|
|
62
|
+
options.onWindowChanged?.(changedWindow);
|
|
63
|
+
}
|
|
64
|
+
const closedId = event?.WindowClosed?.id;
|
|
65
|
+
if (Number.isInteger(closedId)) options.onWindowClosed?.(closedId);
|
|
66
|
+
if (event && typeof event === "object" && "WindowFocusChanged" in event) {
|
|
67
|
+
const focusedId = event.WindowFocusChanged?.id;
|
|
68
|
+
options.onWindowFocusChanged?.(Number.isInteger(focusedId) ? focusedId : null);
|
|
69
|
+
}
|
|
55
70
|
} catch {
|
|
56
71
|
// A malformed event is ignored; the fallback poll remains authoritative.
|
|
57
72
|
}
|