multi-agents-cli 1.0.32 → 1.0.33

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 -13
  2. package/package.json +1 -1
package/init.js CHANGED
@@ -695,14 +695,22 @@ const main = async () => {
695
695
  });
696
696
  console.log(` ${dim(`${active.length + 1}.`)} ${dim('Back')}\n`);
697
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
-
698
+ const pickRes = await prompts({
699
+ type: 'select',
700
+ name: 'value',
701
+ message: 'Which process do you want to restart?',
702
+ choices: [
703
+ ...active.map(({ scope, agent, data }) => ({
704
+ title: `${agent} (${scope}) - ${data.status || 'ACTIVE'}`,
705
+ value: agent,
706
+ })),
707
+ { title: 'Back', value: '__back__' },
708
+ ],
709
+ }, { onCancel: () => process.exit(0) });
710
+
711
+ if (!pickRes.value || pickRes.value === '__back__') return false;
712
+ const idx = active.findIndex(a => a.agent === pickRes.value);
713
+ if (idx < 0) return false;
706
714
  const { scope, agent, data } = active[idx];
707
715
  const deps = (DEPENDENCIES[scope] || {})[agent] || [];
708
716
  const affectedAgents = [{ scope, agent, data }];
@@ -734,11 +742,17 @@ const main = async () => {
734
742
 
735
743
  console.log(`\n ${red('This cannot be undone.')}\n`);
736
744
 
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') {
745
+ const confirmRes = await prompts({
746
+ type: 'select',
747
+ name: 'value',
748
+ message: 'This cannot be undone. Continue?',
749
+ choices: [
750
+ { title: 'Yes - wipe and restart', value: 'y' },
751
+ { title: 'Cancel', value: 'n' },
752
+ ],
753
+ }, { onCancel: () => process.exit(0) });
754
+
755
+ if (confirmRes.value !== 'y') {
742
756
  console.log(dim('\n Cancelled.\n'));
743
757
  return false;
744
758
  }
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.33",
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",