orchestrix-yuri 3.3.0 → 3.3.1

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.
@@ -112,6 +112,43 @@ class PhaseOrchestrator {
112
112
  }
113
113
  }
114
114
 
115
+ /**
116
+ * Capture the current agent's tmux pane content for Claude context injection.
117
+ * Returns a formatted string or null if no agent is active.
118
+ */
119
+ captureCurrentAgentContext() {
120
+ if (!this._phase || !this._session || !tmx.hasSession(this._session)) {
121
+ return null;
122
+ }
123
+
124
+ if (this._phase === 'plan') {
125
+ const agent = PLAN_AGENTS[this._step];
126
+ if (!agent) return null;
127
+
128
+ const pane = tmx.capturePane(this._session, agent.window, 40);
129
+ if (!pane.trim()) return null;
130
+
131
+ const waiting = this._waitingForInput ? ' (WAITING FOR YOUR INPUT)' : '';
132
+ return `[LIVE AGENT CONTEXT] Phase: plan, Agent: ${agent.name} (${this._step + 1}/${PLAN_AGENTS.length})${waiting}\n` +
133
+ `tmux session: ${this._session}, window: ${agent.window}\n` +
134
+ `--- Agent output (last 40 lines) ---\n${pane}\n--- End agent output ---`;
135
+ }
136
+
137
+ if (this._phase === 'develop') {
138
+ // Capture all 4 dev windows briefly
139
+ const windows = ['Architect', 'SM', 'Dev', 'QA'];
140
+ const summaries = [];
141
+ for (let w = 0; w < 4; w++) {
142
+ const tail = tmx.capturePane(this._session, w, 5);
143
+ const lastLine = tail.split('\n').filter((l) => l.trim()).pop() || '(empty)';
144
+ summaries.push(` Window ${w} (${windows[w]}): ${lastLine.trim().slice(0, 80)}`);
145
+ }
146
+ return `[LIVE AGENT CONTEXT] Phase: develop, Session: ${this._session}\n${summaries.join('\n')}`;
147
+ }
148
+
149
+ return null;
150
+ }
151
+
115
152
  getStatus() {
116
153
  if (!this._phase) {
117
154
  return { phase: null, message: 'No phase is running.' };
@@ -270,7 +270,15 @@ class Router {
270
270
  await this._runCatchUp();
271
271
 
272
272
  const projectRoot = engine.resolveProjectRoot();
273
- const prompt = engine.composePrompt(msg.text);
273
+
274
+ // If a phase is running, inject tmux pane context so Claude can see agent state
275
+ let prompt = engine.composePrompt(msg.text);
276
+ if (this.orchestrator.isRunning()) {
277
+ const agentContext = this.orchestrator.captureCurrentAgentContext();
278
+ if (agentContext) {
279
+ prompt = `${agentContext}\n\n---\n\nUser message: ${msg.text}`;
280
+ }
281
+ }
274
282
 
275
283
  log.router(`Processing: "${msg.text.slice(0, 80)}..." → cwd: ${projectRoot || '~'}`);
276
284
  const result = await engine.callClaude({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-yuri",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
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": {