orchestrix-yuri 4.2.1 → 4.2.2

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.
@@ -619,7 +619,12 @@ class Router {
619
619
  const tmx = require('./engine/tmux-utils');
620
620
  if (devSession && tmx.hasSession(devSession)) {
621
621
  const windowNames = ['Architect', 'SM', 'Dev', 'QA'];
622
- // Pass 1: find window with active spinner
622
+ // Detect active agent: an agent showing the Command table or
623
+ // "How can I assist" is IDLE (waiting). A window WITHOUT these
624
+ // patterns is actively executing a task.
625
+ const idlePatterns = /Command.*Description|How can I assist|assist you today/i;
626
+
627
+ // Pass 1: find window with spinner (definitely working)
623
628
  for (let w = 0; w < 4; w++) {
624
629
  const pane = tmx.capturePane(devSession, w, 10);
625
630
  if (/●|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/.test(pane)) {
@@ -628,12 +633,13 @@ class Router {
628
633
  break;
629
634
  }
630
635
  }
631
- // Pass 2: if no spinner, find window with most output (likely active)
636
+
637
+ // Pass 2: find window that is NOT idle (no Command table)
632
638
  if (!currentAgent) {
633
639
  for (let w = 0; w < 4; w++) {
634
- const pane = tmx.capturePane(devSession, w, 10);
635
- const contentLines = pane.split('\n').filter((l) => l.trim() && !/^❯\s*$/.test(l));
636
- if (contentLines.length > 3) {
640
+ const pane = tmx.capturePane(devSession, w, 15);
641
+ const hasContent = pane.split('\n').filter((l) => l.trim()).length > 2;
642
+ if (hasContent && !idlePatterns.test(pane)) {
637
643
  currentAgent = windowNames[w];
638
644
  currentWindow = w;
639
645
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-yuri",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "Yuri — Meta-Orchestrator for Orchestrix. Drive your entire project lifecycle with natural language.",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {