@automagik/genie 0.260203.639 → 0.260203.711

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/genie",
3
- "version": "0.260203.0639",
3
+ "version": "0.260203.0711",
4
4
  "description": "Collaborative terminal toolkit for human + AI workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -67,18 +67,21 @@ export async function readSessionLogs(
67
67
  throw new Error(`Session "${sessionName}" not found`);
68
68
  }
69
69
 
70
- // Get first window and pane
70
+ // Get active window and pane (never assume index 0)
71
71
  const windows = await tmux.listWindows(session.id);
72
72
  if (!windows || windows.length === 0) {
73
73
  throw new Error(`No windows found in session "${sessionName}"`);
74
74
  }
75
75
 
76
- const panes = await tmux.listPanes(windows[0].id);
76
+ const activeWindow = windows.find(w => w.active) || windows[0];
77
+
78
+ const panes = await tmux.listPanes(activeWindow.id);
77
79
  if (!panes || panes.length === 0) {
78
80
  throw new Error(`No panes found in session "${sessionName}"`);
79
81
  }
80
82
 
81
- const paneId = panes[0].id;
83
+ const activePane = panes.find(p => p.active) || panes[0];
84
+ const paneId = activePane.id;
82
85
 
83
86
  // Parse range if provided
84
87
  if (options.range) {
@@ -162,12 +165,15 @@ export async function followSessionLogs(
162
165
  throw new Error(`No windows found in session "${sessionName}"`);
163
166
  }
164
167
 
165
- const panes = await tmux.listPanes(windows[0].id);
168
+ const activeWindow = windows.find(w => w.active) || windows[0];
169
+
170
+ const panes = await tmux.listPanes(activeWindow.id);
166
171
  if (!panes || panes.length === 0) {
167
172
  throw new Error(`No panes found in session "${sessionName}"`);
168
173
  }
169
174
 
170
- const paneId = panes[0].id;
175
+ const activePane = panes.find(p => p.active) || panes[0];
176
+ const paneId = activePane.id;
171
177
  let lastContent = '';
172
178
  let following = true;
173
179
 
@@ -81,12 +81,15 @@ export class EventMonitor extends EventEmitter {
81
81
  throw new Error(`No windows found in session "${this.sessionName}"`);
82
82
  }
83
83
 
84
- const panes = await tmux.listPanes(windows[0].id);
84
+ const activeWindow = windows.find(w => w.active) || windows[0];
85
+
86
+ const panes = await tmux.listPanes(activeWindow.id);
85
87
  if (!panes || panes.length === 0) {
86
88
  throw new Error(`No panes found in session "${this.sessionName}"`);
87
89
  }
88
90
 
89
- this.paneId = panes[0].id;
91
+ const activePane = panes.find(p => p.active) || panes[0];
92
+ this.paneId = activePane.id;
90
93
  }
91
94
 
92
95
  this.running = true;
@@ -1,5 +1,5 @@
1
1
  // Runtime version (baked in at build time)
2
- export const VERSION = '0.260203.0639';
2
+ export const VERSION = '0.260203.0711';
3
3
 
4
4
  // Generate version string from current datetime
5
5
  // Format: 0.YYMMDD.HHMM (e.g., 0.260201.1430 = Feb 1, 2026 at 14:30)