multi-agents-cli 1.0.32 → 1.0.34

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/init.js +27 -19
  2. package/package.json +1 -1
package/init.js CHANGED
@@ -688,21 +688,23 @@ const main = async () => {
688
688
  }
689
689
 
690
690
  separator();
691
- console.log(`\n${bold(' Which process do you want to restart?')}\n`);
692
- active.forEach(({ scope, agent, data }, i) => {
693
- const status = data.status || 'ACTIVE';
694
- console.log(` ${dim(`${i + 1}.`)} ${bold(agent)} ${dim(`(${scope})`)} - ${dim(status)}`);
695
- });
696
- console.log(` ${dim(`${active.length + 1}.`)} ${dim('Back')}\n`);
697
-
698
- const rl3 = readline.createInterface({ input: process.stdin, output: process.stdout });
699
- const ask3 = (q) => new Promise((resolve) => rl3.question(q, (a) => { rl3.close(); resolve(a.trim()); }));
700
- const pick = await ask3(` ${bold('Select')} ${dim(`(1-${active.length + 1})`)}: `);
701
-
702
- const idx = parseInt(pick) - 1;
703
- if (idx === active.length) return false; // Back
704
- if (idx < 0 || idx >= active.length) return false;
705
691
 
692
+ const pickRes = await prompts({
693
+ type: 'select',
694
+ name: 'value',
695
+ message: 'Which process do you want to restart?',
696
+ choices: [
697
+ ...active.map(({ scope, agent, data }) => ({
698
+ title: `${agent} (${scope}) - ${data.status || 'ACTIVE'}`,
699
+ value: agent,
700
+ })),
701
+ { title: 'Back', value: '__back__' },
702
+ ],
703
+ }, { onCancel: () => process.exit(0) });
704
+
705
+ if (!pickRes.value || pickRes.value === '__back__') return false;
706
+ const idx = active.findIndex(a => a.agent === pickRes.value);
707
+ if (idx < 0) return false;
706
708
  const { scope, agent, data } = active[idx];
707
709
  const deps = (DEPENDENCIES[scope] || {})[agent] || [];
708
710
  const affectedAgents = [{ scope, agent, data }];
@@ -734,11 +736,17 @@ const main = async () => {
734
736
 
735
737
  console.log(`\n ${red('This cannot be undone.')}\n`);
736
738
 
737
- const rl4 = readline.createInterface({ input: process.stdin, output: process.stdout });
738
- const ask4 = (q) => new Promise((resolve) => rl4.question(q, (a) => { rl4.close(); resolve(a.trim()); }));
739
- const confirm = await ask4(` Continue? (y/N): `);
740
-
741
- if (confirm.toLowerCase() !== 'y') {
739
+ const confirmRes = await prompts({
740
+ type: 'select',
741
+ name: 'value',
742
+ message: 'This cannot be undone. Continue?',
743
+ choices: [
744
+ { title: 'Yes - wipe and restart', value: 'y' },
745
+ { title: 'Cancel', value: 'n' },
746
+ ],
747
+ }, { onCancel: () => process.exit(0) });
748
+
749
+ if (confirmRes.value !== 'y') {
742
750
  console.log(dim('\n Cancelled.\n'));
743
751
  return false;
744
752
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-agents-cli",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
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",