orchestrix-yuri 4.1.2 → 4.1.3

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.
@@ -270,30 +270,51 @@ class Router {
270
270
  parts.push(status.message);
271
271
  }
272
272
 
273
- // Read project state from YAML works even if orchestrator isn't tracking
273
+ // Read project state generate progress card even if orchestrator isn't tracking
274
274
  const projectRoot = engine.resolveProjectRoot();
275
- if (projectRoot) {
275
+ if (projectRoot && !this.orchestrator.isRunning()) {
276
276
  const focusPath = path.join(projectRoot, '.yuri', 'focus.yaml');
277
277
  if (fs.existsSync(focusPath)) {
278
278
  try {
279
279
  const focus = yaml.load(fs.readFileSync(focusPath, 'utf8')) || {};
280
- if (focus.pulse) parts.push(`Pulse: ${focus.pulse}`);
281
- if (focus.step) parts.push(`Step: ${focus.step}`);
282
-
283
- // If YAML says in_progress but orchestrator isn't tracking, warn
284
- if (!this.orchestrator.isRunning() && focus.phase) {
285
- const phasePaths = {
286
- 2: path.join(projectRoot, '.yuri', 'state', 'phase2.yaml'),
287
- 3: path.join(projectRoot, '.yuri', 'state', 'phase3.yaml'),
288
- };
289
- const statePath = phasePaths[focus.phase];
290
- if (statePath && fs.existsSync(statePath)) {
291
- const state = yaml.load(fs.readFileSync(statePath, 'utf8')) || {};
292
- if (state.status === 'in_progress') {
293
- parts.push(`\n⚠️ Phase ${focus.phase} was in progress but orchestrator lost track (gateway restarted?). Send *plan or *develop to reconnect.`);
280
+
281
+ // Dev phase in progress: generate progress card directly
282
+ if (focus.phase === 3 || focus.phase === '3') {
283
+ const phase3Path = path.join(projectRoot, '.yuri', 'state', 'phase3.yaml');
284
+ if (fs.existsSync(phase3Path)) {
285
+ const phase3 = yaml.load(fs.readFileSync(phase3Path, 'utf8')) || {};
286
+ if (phase3.status === 'in_progress') {
287
+ // Temporarily set orchestrator's project root to generate card
288
+ const savedRoot = this.orchestrator._projectRoot;
289
+ const savedSession = this.orchestrator._session;
290
+ const savedStarted = this.orchestrator._devStartedAt;
291
+
292
+ this.orchestrator._projectRoot = projectRoot;
293
+ if (phase3.tmux && phase3.tmux.session) {
294
+ this.orchestrator._session = phase3.tmux.session;
295
+ }
296
+ this.orchestrator._devStartedAt = phase3.started_at
297
+ ? new Date(phase3.started_at).getTime() : Date.now();
298
+
299
+ try {
300
+ const progress = this.orchestrator._gatherDevProgress();
301
+ const card = this.orchestrator._buildProgressCard(progress);
302
+ parts.push(card);
303
+ } catch { /* fallback below */ }
304
+
305
+ // Restore
306
+ this.orchestrator._projectRoot = savedRoot;
307
+ this.orchestrator._session = savedSession;
308
+ this.orchestrator._devStartedAt = savedStarted;
294
309
  }
295
310
  }
296
311
  }
312
+
313
+ // Fallback: show pulse/step if no card was generated
314
+ if (parts.length === 0) {
315
+ if (focus.pulse) parts.push(`Pulse: ${focus.pulse}`);
316
+ if (focus.step) parts.push(`Step: ${focus.step}`);
317
+ }
297
318
  } catch { /* ok */ }
298
319
  }
299
320
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-yuri",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
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": {