orchestrix-yuri 4.8.9 → 4.8.10

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.
@@ -784,15 +784,21 @@ class PhaseOrchestrator {
784
784
  }
785
785
  }
786
786
 
787
- // Detect current active agent from tmux panes
787
+ // Detect current active agent from tmux panes.
788
+ // An agent is ACTIVE only if it has a spinner (●⠋⠙⠹...) — meaning Claude
789
+ // is processing. Presence of ❯ anywhere means agent is at prompt = IDLE.
790
+ // Previous logic checked "last line != ❯" but Claude Code's UI has
791
+ // decorations (bypass permissions, separator lines) below ❯, causing
792
+ // false positives.
788
793
  if (this._session && tmx.hasSession(this._session)) {
789
794
  const windowNames = ['Architect', 'SM', 'Dev', 'QA'];
790
795
  for (let w = 0; w < 4; w++) {
791
- const pane = tmx.capturePane(this._session, w, 5);
792
- // Active = has processing indicator () or recent output (not just ❯)
793
- const lines = pane.split('\n').filter((l) => l.trim());
794
- const lastLine = lines[lines.length - 1] || '';
795
- if (/●|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/.test(pane) || (lines.length > 2 && !/^❯\s*$/.test(lastLine))) {
796
+ const pane = tmx.capturePane(this._session, w, 10);
797
+ const hasSpinner = /●|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/.test(pane);
798
+ const hasPrompt = /❯/.test(pane);
799
+
800
+ // Active = has spinner AND no prompt (spinner + prompt = just finished)
801
+ if (hasSpinner && !hasPrompt) {
796
802
  result.currentAgent = windowNames[w];
797
803
  result.currentWindow = w;
798
804
 
@@ -1026,33 +1026,20 @@ Reply with ONLY one word: small, medium, or large. Nothing else.`;
1026
1026
  const tmx = require('./engine/tmux-utils');
1027
1027
  if (devSession && tmx.hasSession(devSession)) {
1028
1028
  const windowNames = ['Architect', 'SM', 'Dev', 'QA'];
1029
- // Detect active agent: an agent showing the Command table or
1030
- // "How can I assist" is IDLE (waiting). A window WITHOUT these
1031
- // patterns is actively executing a task.
1032
- const idlePatterns = /Command.*Description/i;
1033
-
1034
- // Pass 1: find window with spinner (definitely working)
1029
+ // Active = has spinner (●⠋⠙⠹...) AND no prompt.
1030
+ // anywhere in pane = agent is idle at prompt.
1031
+ // Previous "no Command table" heuristic had false positives
1032
+ // (SM conversation output looks like activity but isn't).
1035
1033
  for (let w = 0; w < 4; w++) {
1036
1034
  const pane = tmx.capturePane(devSession, w, 10);
1037
- if (/●|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/.test(pane)) {
1035
+ const hasSpinner = /●|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/.test(pane);
1036
+ const hasPrompt = /❯/.test(pane);
1037
+ if (hasSpinner && !hasPrompt) {
1038
1038
  currentAgent = windowNames[w];
1039
1039
  currentWindow = w;
1040
1040
  break;
1041
1041
  }
1042
1042
  }
1043
-
1044
- // Pass 2: find window that is NOT idle (no Command table)
1045
- if (!currentAgent) {
1046
- for (let w = 0; w < 4; w++) {
1047
- const pane = tmx.capturePane(devSession, w, 15);
1048
- const hasContent = pane.split('\n').filter((l) => l.trim()).length > 2;
1049
- if (hasContent && !idlePatterns.test(pane)) {
1050
- currentAgent = windowNames[w];
1051
- currentWindow = w;
1052
- break;
1053
- }
1054
- }
1055
- }
1056
1043
  }
1057
1044
 
1058
1045
  // 4. Count epics from docs/prd/ (epic YAML files)
@@ -1106,9 +1093,9 @@ Reply with ONLY one word: small, medium, or large. Nothing else.`;
1106
1093
  }
1107
1094
 
1108
1095
  if (currentAgent) {
1109
- lines.push(`🤖 Agent: ${currentAgent} (window ${currentWindow})`);
1110
- } else if (devSession) {
1111
- lines.push(`Session: ${devSession}`);
1096
+ lines.push(`🤖 Agent: ${currentAgent}`);
1097
+ } else {
1098
+ lines.push(`🤖 All agents idle`);
1112
1099
  }
1113
1100
 
1114
1101
  lines.push(`⏱ Running for ${elapsed}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-yuri",
3
- "version": "4.8.9",
3
+ "version": "4.8.10",
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": {