multi-agents-cli 1.0.66 → 1.0.68
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.
- package/core/workflow/agent.js +7 -98
- package/package.json +1 -1
package/core/workflow/agent.js
CHANGED
|
@@ -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(' |-- '
|
|
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,14 @@ ${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
|
-
|
|
1405
|
-
console.log(`\n ${dim('When the agent is done, run:')} ${cyan('npm run complete')}\n`);
|
|
1404
|
+
console.log(`\n ${dim("This window can be closed.")}`);
|
|
1406
1405
|
rl.close();
|
|
1407
1406
|
process.exit(0);
|
|
1408
1407
|
|
|
1409
1408
|
} else if (sessionIdx === 1) {
|
|
1410
1409
|
const openedIDE = openIDE(worktreePath);
|
|
1411
|
-
if (openedIDE) console.log(` ${green(
|
|
1412
|
-
else console.log(` ${yellow(
|
|
1413
|
-
separator();
|
|
1410
|
+
if (openedIDE) console.log(` ${green("✓")} ${openedIDE} opened`);
|
|
1411
|
+
else console.log(` ${yellow("!")} Could not open IDE - open manually at: ${dim(worktreePath)}`);
|
|
1414
1412
|
console.log(`\n ${dim('Open a NEW Claude Code session and type')} ${cyan('go')} ${dim('to start.')}\n`);
|
|
1415
1413
|
console.log(` ${dim('When done, run:')} ${cyan('npm run complete')}\n`);
|
|
1416
1414
|
rl.close();
|
|
@@ -1419,9 +1417,7 @@ ${excludedUrls}
|
|
|
1419
1417
|
} else if (sessionIdx === 2) {
|
|
1420
1418
|
const termOpened = openTerminal(worktreePath);
|
|
1421
1419
|
if (termOpened) console.log(` ${green('✓')} New terminal opened with Claude Code CLI`);
|
|
1422
|
-
|
|
1423
|
-
separator();
|
|
1424
|
-
console.log(`\n ${dim('When the agent is done, run:')} ${cyan('npm run complete')}\n`);
|
|
1420
|
+
console.log(`\n ${dim("This window can be closed.")}`);
|
|
1425
1421
|
rl.close();
|
|
1426
1422
|
process.exit(0);
|
|
1427
1423
|
|
|
@@ -1478,93 +1474,6 @@ ${excludedUrls}
|
|
|
1478
1474
|
}
|
|
1479
1475
|
}
|
|
1480
1476
|
} // 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
1477
|
};
|
|
1569
1478
|
|
|
1570
1479
|
main().catch((err) => {
|
package/package.json
CHANGED