orchestrix-yuri 4.7.9 → 4.7.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.
@@ -365,7 +365,7 @@ class Router {
365
365
  // Agent-specific or decision queries need Claude reasoning with tmux context,
366
366
  // not a canned status card. Fall through to conversation handler.
367
367
  const agentRe = /\b(sm|architect|dev|qa|po|pm|ux)\b/i;
368
- const decisionRe = /决策|决定|确认|需要我|block|decide|should i|approve/i;
368
+ const decisionRe = /决策|决定|确认|需要我|应该|接着|下一步|然后呢|干啥|干什么|block|decide|should|next|what now/i;
369
369
  if (agentRe.test(msg.text) || decisionRe.test(msg.text)) {
370
370
  return null; // → conversation handler (Claude with tmux context)
371
371
  }
@@ -480,8 +480,13 @@ class Router {
480
480
  tmx.sendKeysWithEnter(session, matched.window, `/o ${matched.slug}`);
481
481
  execSync('sleep 12');
482
482
 
483
- // Send the user's instruction directly
484
- const safeDesc = description.replace(/"/g, '\\"');
483
+ // Clean description: strip [CONTEXT] prefix injected by dispatcher
484
+ let cleanDesc = description;
485
+ const ctxMatch = cleanDesc.match(/\[CONTEXT\].*?(?:User message:\s*)?(.+)/s);
486
+ if (ctxMatch) cleanDesc = ctxMatch[1].trim();
487
+ if (!cleanDesc) cleanDesc = description;
488
+
489
+ const safeDesc = cleanDesc.replace(/"/g, '\\"');
485
490
  tmx.sendKeysWithEnter(session, matched.window, safeDesc);
486
491
 
487
492
  // Set up polling via orchestrator (reuses change/small flow)
@@ -505,7 +510,20 @@ class Router {
505
510
  if (this.orchestrator._timer) { clearInterval(this.orchestrator._timer); this.orchestrator._timer = null; }
506
511
  this.orchestrator._phase = null;
507
512
  this.orchestrator._changeContext = null;
508
- this.orchestrator.onComplete('change', `✅ ${matched.slug} completed the task.`);
513
+
514
+ // Capture agent output for a meaningful completion summary
515
+ let summary = `✅ **${matched.slug}** completed the task.`;
516
+ try {
517
+ const pane = tmx.capturePane(session, matched.window, 30);
518
+ const outputLines = pane.split('\n').filter((l) => l.trim() && !/^❯/.test(l.trim()));
519
+ if (outputLines.length > 0) {
520
+ const tail = outputLines.slice(-8).map((l) => l.trim()).join('\n');
521
+ summary += `\n\n📋 Output (last lines):\n${tail}`;
522
+ }
523
+ } catch { /* ok */ }
524
+ summary += `\n\n💡 Suggested next: review the output, then tell me what to do next (e.g., "让 dev 开始实现" or "*develop").`;
525
+
526
+ this.orchestrator.onComplete('change', summary);
509
527
  return;
510
528
  }
511
529
  if (check.status !== 'stable') { this.orchestrator._stableCount = 0; this.orchestrator._lastHash = check.hash || ''; }
@@ -513,7 +531,7 @@ class Router {
513
531
  }, pollInterval);
514
532
 
515
533
  this.history.append(msg.chatId, 'user', msg.text);
516
- const reply = `🎯 Direct → **${matched.slug}** (window ${matched.window})\n\n"${description.slice(0, 120)}"\n\nI'll notify you when done.`;
534
+ const reply = `🎯 Direct → **${matched.slug}**\n\n"${cleanDesc.slice(0, 120)}"\n\nI'll notify you when done.`;
517
535
  this.history.append(msg.chatId, 'assistant', reply);
518
536
  this._updateGlobalFocus(msg, projectRoot);
519
537
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-yuri",
3
- "version": "4.7.9",
3
+ "version": "4.7.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": {