dual-brain 0.3.30 → 0.3.31

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.
Files changed (2) hide show
  1. package/bin/dual-brain.mjs +12 -3
  2. package/package.json +1 -1
@@ -1558,8 +1558,12 @@ async function cmdRuntimeSwitch(args = []) {
1558
1558
  console.log('');
1559
1559
 
1560
1560
  if (args.includes('--apply')) {
1561
- const applied = await processPendingRuntimeSwitch(cwd);
1562
- if (!applied) console.log('Could not apply live here; resume the session through dual-brain to use these settings.');
1561
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
1562
+ console.log('Non-interactive shell detected: saved for the active dual-brain terminal to apply.');
1563
+ } else {
1564
+ const applied = await processPendingRuntimeSwitch(cwd);
1565
+ if (!applied) console.log('Could not apply live here; resume the session through dual-brain to use these settings.');
1566
+ }
1563
1567
  }
1564
1568
  }
1565
1569
 
@@ -1571,6 +1575,12 @@ async function cmdAuto(args = []) {
1571
1575
  }
1572
1576
 
1573
1577
  async function cmdSwitchover(args = []) {
1578
+ const joined = args.join(' ').toLowerCase();
1579
+ if (/\b(auto|automode|auto mode|smart auto)\b/.test(joined)) {
1580
+ await cmdAuto(args);
1581
+ return;
1582
+ }
1583
+
1574
1584
  const cwd = process.cwd();
1575
1585
  let sessions = [];
1576
1586
  try { sessions = enrichSessions(importReplitSessions(cwd), cwd); } catch {}
@@ -1588,7 +1598,6 @@ async function cmdSwitchover(args = []) {
1588
1598
  }
1589
1599
 
1590
1600
  let target = null;
1591
- const joined = args.join(' ').toLowerCase();
1592
1601
  if (/\b(gpt|codex|openai)\b/.test(joined)) target = 'codex';
1593
1602
  if (/\bclaude\b/.test(joined)) target = 'claude';
1594
1603
  target ||= _sessionTool(sess) === 'codex' ? 'claude' : 'codex';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dual-brain",
3
- "version": "0.3.30",
3
+ "version": "0.3.31",
4
4
  "description": "AI orchestration across Claude + OpenAI subscriptions — smart routing, budget awareness, and dual-brain collaboration",
5
5
  "type": "module",
6
6
  "bin": {