bi-agent-kit 0.1.0 → 0.1.1

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/cli.js +31 -9
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -690,15 +690,37 @@ async function runInstallFlow(parsed) {
690
690
  value: group.absPath,
691
691
  label: labelForTargetIds(group.targetIds) + " (" + group.absPath + ")",
692
692
  }));
693
- const chosenTargets = await clack.multiselect({
694
- message: "Select which detected config files to install into",
695
- options: targetOptions,
696
- initialValues: groups.map((g) => g.absPath).filter((absPath) => previousAbsPaths.has(absPath)),
697
- required: false,
698
- });
699
- if (clack.isCancel(chosenTargets)) {
700
- clack.cancel("Cancelled.");
701
- process.exit(1);
693
+ let chosenTargets;
694
+ // Re-prompt loop: selecting no target when servers ARE chosen installs
695
+ // nothing (raw = chosenServers x chosenTargets, empty targets => empty),
696
+ // which is almost never intended -- warn and re-ask, with a confirm escape
697
+ // hatch so a user who really wants to write nothing can still proceed.
698
+ for (;;) {
699
+ chosenTargets = await clack.multiselect({
700
+ message: "Select which detected config files to install into",
701
+ options: targetOptions,
702
+ initialValues: groups.map((g) => g.absPath).filter((absPath) => previousAbsPaths.has(absPath)),
703
+ required: false,
704
+ });
705
+ if (clack.isCancel(chosenTargets)) {
706
+ clack.cancel("Cancelled.");
707
+ process.exit(1);
708
+ }
709
+ if (chosenServers.length === 0 || chosenTargets.length > 0) break;
710
+
711
+ clack.log.warn(
712
+ "You selected " + chosenServers.length + " server(s) but no config file to install into -- " +
713
+ "nothing would be written and no setup steps would run."
714
+ );
715
+ const proceedAnyway = await clack.confirm({
716
+ message: "Install nothing and exit?",
717
+ initialValue: false,
718
+ });
719
+ if (clack.isCancel(proceedAnyway)) {
720
+ clack.cancel("Cancelled.");
721
+ process.exit(1);
722
+ }
723
+ if (proceedAnyway) break;
702
724
  }
703
725
 
704
726
  const { raw, reconfigured } = await resolveInteractiveSelections({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bi-agent-kit",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Installs BI-related MCP server entries into AI coding tool configs, without clobbering anything else already there.",
5
5
  "type": "module",
6
6
  "bin": {