multi-agents-cli 1.0.65 → 1.0.67

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.
@@ -194,12 +194,12 @@ const displayWorkspaceTree = (worktreeName, worktreePath, project, agent, framew
194
194
  console.log(`\n ${bold('Your workspace is ready:')}\n`);
195
195
  console.log(` worktrees/`);
196
196
  console.log(` ${dim('└──')} ${cyan(worktreeName + '/')} ${dim('<- scope (' + project + ') - agent (' + agent + ') - timestamp')}`);
197
- console.log(` ${dim(' |-- TASK.md')} ${dim('<- read this first, contains your task')}`);
197
+ console.log(` ${dim(' |-- ')}${yellow('TASK.md')} ${dim('<- read this first, contains your task')}`);
198
198
  console.log(` ${dim(' |-- .claude-scope')} ${dim('<- scope identity (' + project + ' / ' + agent + ')')}`);
199
199
  console.log(` ${dim(' |-- scope.json')} ${dim('<- enforcement policy reference')}`);
200
200
  console.log(` ${dim(' |-- package.json')} ${dim('<- run npm run complete when done')}`);
201
- console.log(` ${dim(' |-- ' + project + '/')} ${dim('<- your work goes here')}`);
202
- console.log(` ${dim(' | |-- CLAUDE.md')} ${dim('<- ' + project + '-specific rules and stack config')}`);
201
+ console.log(` ${dim(' |-- ')}${green(project + '/')} ${dim('<- your work goes here')}`);
202
+ console.log(` ${dim(' | |-- ')}${cyan('CLAUDE.md')} ${dim('<- ' + project + '-specific rules and stack config')}`);
203
203
  console.log(` ${dim(' |-- .agents/')}`);
204
204
  console.log(` ${dim(' | |-- ' + project + '/')}`);
205
205
  console.log(` ${dim(' | |-- ' + agent + '.md')} ${dim('<- agent instructions, loaded by Claude Code')}`);
@@ -1401,16 +1401,13 @@ ${excludedUrls}
1401
1401
  const termOpened = openTerminal(worktreePath);
1402
1402
  if (termOpened) console.log(` ${green('✓')} New terminal opened with Claude Code CLI`);
1403
1403
  else console.log(` ${yellow('!')} Could not open terminal - run ${cyan('claude')} manually in: ${dim(worktreePath)}`);
1404
- separator();
1405
- console.log(`\n ${dim('When the agent is done, run:')} ${cyan('npm run complete')}\n`);
1406
1404
  rl.close();
1407
1405
  process.exit(0);
1408
1406
 
1409
1407
  } else if (sessionIdx === 1) {
1410
1408
  const openedIDE = openIDE(worktreePath);
1411
- if (openedIDE) console.log(` ${green('')} ${openedIDE} opened`);
1412
- else console.log(` ${yellow('!')} Could not open IDE - open manually at: ${dim(worktreePath)}`);
1413
- separator();
1409
+ if (openedIDE) console.log(` ${green("")} ${openedIDE} opened`);
1410
+ else console.log(` ${yellow("!")} Could not open IDE - open manually at: ${dim(worktreePath)}`);
1414
1411
  console.log(`\n ${dim('Open a NEW Claude Code session and type')} ${cyan('go')} ${dim('to start.')}\n`);
1415
1412
  console.log(` ${dim('When done, run:')} ${cyan('npm run complete')}\n`);
1416
1413
  rl.close();
@@ -1419,9 +1416,6 @@ ${excludedUrls}
1419
1416
  } else if (sessionIdx === 2) {
1420
1417
  const termOpened = openTerminal(worktreePath);
1421
1418
  if (termOpened) console.log(` ${green('✓')} New terminal opened with Claude Code CLI`);
1422
- else console.log(` ${yellow('!')} Could not open terminal - run ${cyan('claude')} manually in: ${dim(worktreePath)}`);
1423
- separator();
1424
- console.log(`\n ${dim('When the agent is done, run:')} ${cyan('npm run complete')}\n`);
1425
1419
  rl.close();
1426
1420
  process.exit(0);
1427
1421
 
@@ -1478,93 +1472,6 @@ ${excludedUrls}
1478
1472
  }
1479
1473
  }
1480
1474
  } // end sessionLoop
1481
- // ── Session start selection ─────────────────────────────────────────────────
1482
-
1483
- separator();
1484
- console.log(`\n${bold(' Workspace is set up and ready.')}\n`);
1485
-
1486
- const sessionIdx = await arrowSelect('How would you like to start the session?', [
1487
- { label: `${green('→')} IDE + new terminal ${dim('(Claude Code CLI)')} ${dim('← recommended')}` },
1488
- { label: `${green('→')} IDE only` },
1489
- { label: `${green('→')} Claude Code CLI only ${dim('(new terminal)')}` },
1490
- { label: `${dim('?')} I'll continue from here, where do I start?` },
1491
- ], rl);
1492
-
1493
- if (sessionIdx === 0) {
1494
- const openedIDE = openIDE(worktreePath);
1495
- if (openedIDE) console.log(` ${green('✓')} ${openedIDE} opened`);
1496
- else console.log(` ${yellow('!')} Could not open IDE - open manually at: ${dim(worktreePath)}`);
1497
- const termOpened = openTerminal(worktreePath);
1498
- if (termOpened) console.log(` ${green('✓')} New terminal opened with Claude Code CLI`);
1499
- else console.log(` ${yellow('!')} Could not open terminal - run ${cyan('claude')} manually in: ${dim(worktreePath)}`);
1500
- separator();
1501
- console.log(`\n ${dim('When the agent is done, run:')} ${cyan('npm run complete')}\n`);
1502
-
1503
- } else if (sessionIdx === 1) {
1504
- const openedIDE = openIDE(worktreePath);
1505
- if (openedIDE) console.log(` ${green('✓')} ${openedIDE} opened`);
1506
- else console.log(` ${yellow('!')} Could not open IDE - open manually at: ${dim(worktreePath)}`);
1507
- separator();
1508
- console.log(`\n ${dim('Open a NEW Claude Code session and type')} ${cyan('go')} ${dim('to start.')}\n`);
1509
- console.log(` ${dim('When done, run:')} ${cyan('npm run complete')}\n`);
1510
-
1511
- } else if (sessionIdx === 2) {
1512
- const termOpened = openTerminal(worktreePath);
1513
- if (termOpened) console.log(` ${green('✓')} New terminal opened with Claude Code CLI`);
1514
- else console.log(` ${yellow('!')} Could not open terminal - run ${cyan('claude')} manually in: ${dim(worktreePath)}`);
1515
- separator();
1516
- console.log(`\n ${dim('When the agent is done, run:')} ${cyan('npm run complete')}\n`);
1517
-
1518
- } else {
1519
- separator();
1520
- const subIdx = await arrowSelect('What would you like to view?', [
1521
- { label: 'View instructions' },
1522
- { label: 'View folder structure' },
1523
- { label: 'View available agents' },
1524
- ], rl);
1525
-
1526
- if (subIdx === 0) {
1527
- separator();
1528
- console.log(`\n ${bold('How to start your agent session:')}\n`);
1529
- console.log(` ${bold('1.')} Open your IDE at:`);
1530
- console.log(` ${cyan(worktreePath)}\n`);
1531
- console.log(` ${bold('2.')} Open a NEW Claude Code session and type ${cyan('go')} to start`);
1532
- console.log(dim(' Do NOT reuse a previous session.\n'));
1533
- console.log(` ${bold('3.')} Let the agent run autonomously\n`);
1534
- console.log(` ${bold('4.')} When done, run: ${cyan('npm run complete')} to merge into main\n`);
1535
- separator();
1536
- console.log('');
1537
- await arrowSelect('Press enter to continue', [{ label: 'OK, got it' }], rl);
1538
-
1539
- } else if (subIdx === 1) {
1540
- const framework = config.client?.framework || config.backend?.framework || '';
1541
- displayWorkspaceTree(worktreeName, worktreePath, project, agent, framework);
1542
- separator();
1543
- console.log('');
1544
- await arrowSelect('Press enter to continue', [{ label: 'OK, got it' }], rl);
1545
-
1546
- } else {
1547
- const allAgents = AGENTS[project] || [];
1548
- const completed = buildEntries.filter(e => e.scope === project && e.status === 'COMPLETED').map(e => e.agent);
1549
- separator();
1550
- console.log(`\n ${bold('Available agents for ' + project + ':')}\n`);
1551
- allAgents.forEach(a => {
1552
- const done = completed.includes(a);
1553
- const current = a === agent;
1554
- const icon = current ? cyan('→') : done ? green('✓') : dim('·');
1555
- const label = current ? bold(cyan(a)) : done ? dim(a + ' (completed)') : a;
1556
- console.log(` ${icon} ${label}`);
1557
- });
1558
- console.log('');
1559
- separator();
1560
- console.log('');
1561
- await arrowSelect('Press enter to continue', [{ label: 'OK, got it' }], rl);
1562
- }
1563
- }
1564
-
1565
- separator();
1566
- console.log('');
1567
- rl.close();
1568
1475
  };
1569
1476
 
1570
1477
  main().catch((err) => {
package/init.js CHANGED
@@ -1014,32 +1014,32 @@ const main = async () => {
1014
1014
  }
1015
1015
 
1016
1016
 
1017
- // ── Terminal selection ────────────────────────────────────────────────────────
1018
-
1019
- const TERMINAL_OPTIONS = process.platform === 'darwin'
1020
- ? [
1021
- { name: 'Terminal.app', cmd: 'Terminal' },
1022
- { name: 'iTerm2', cmd: 'iTerm2' },
1023
- { name: 'Warp', cmd: 'Warp' },
1024
- { name: 'Other / skip', cmd: null },
1025
- ]
1026
- : process.platform === 'win32'
1027
- ? [
1028
- { name: 'Command Prompt', cmd: 'cmd' },
1029
- { name: 'PowerShell', cmd: 'powershell' },
1030
- { name: 'Other / skip', cmd: null },
1031
- ]
1032
- : [
1033
- { name: 'gnome-terminal', cmd: 'gnome-terminal' },
1034
- { name: 'xterm', cmd: 'xterm' },
1035
- { name: 'Other / skip', cmd: null },
1017
+ // ── Terminal detection ────────────────────────────────────────────────────────
1018
+
1019
+ const detectTerminal = () => {
1020
+ const platform = process.platform;
1021
+ if (platform === 'darwin') {
1022
+ const apps = [
1023
+ { name: 'iTerm2', cmd: 'iTerm2', path: '/Applications/iTerm.app' },
1024
+ { name: 'Warp', cmd: 'Warp', path: '/Applications/Warp.app' },
1025
+ { name: 'Terminal.app', cmd: 'Terminal', path: '/System/Applications/Utilities/Terminal.app' },
1036
1026
  ];
1027
+ return apps.find(a => fs.existsSync(a.path)) || { name: 'Terminal.app', cmd: 'Terminal' };
1028
+ } else if (platform === 'win32') {
1029
+ const wtPath = process.env.LOCALAPPDATA + '\\Microsoft\\WindowsApps\\wt.exe';
1030
+ if (fs.existsSync(wtPath)) return { name: 'Windows Terminal', cmd: 'wt' };
1031
+ return { name: 'Command Prompt', cmd: 'cmd' };
1032
+ } else {
1033
+ const terms = ['gnome-terminal', 'konsole', 'xterm'];
1034
+ for (const t of terms) {
1035
+ try { execSync('which ' + t, { stdio: 'pipe' }); return { name: t, cmd: t }; } catch {}
1036
+ }
1037
+ return { name: 'xterm', cmd: 'xterm' };
1038
+ }
1039
+ };
1037
1040
 
1038
- const termIdx = await arrowSelect('* Preferred terminal (for Claude Code CLI):', TERMINAL_OPTIONS.map(t => ({ label: t.name })), rl);
1039
- const termChoice = TERMINAL_OPTIONS[termIdx];
1040
- console.log(` ${green('✓')} ${termChoice.name}`);
1041
-
1042
- separator();
1041
+ const termChoice = detectTerminal();
1042
+ console.log(dim(' Terminal detected: ') + green(termChoice.name));
1043
1043
 
1044
1044
  // ── Summary ─────────────────────────────────────────────────────────────────
1045
1045
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-agents-cli",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "Multi-agent workflow orchestration for Claude Code — isolated git worktrees, structured state tracking, autonomous task chaining",
5
5
  "keywords": [
6
6
  "claude-code",