@withone/cli 1.17.1 → 1.17.2

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/dist/index.js +0 -128
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -223,12 +223,6 @@ var AGENTS = [
223
223
  projectConfigPath: ".kiro/settings/mcp.json"
224
224
  }
225
225
  ];
226
- function getAllAgents() {
227
- return AGENTS;
228
- }
229
- function supportsProjectScope(agent) {
230
- return agent.projectConfigPath !== void 0;
231
- }
232
226
  function getAgentConfigPath(agent, scope = "global") {
233
227
  if (scope === "project" && agent.projectConfigPath) {
234
228
  return path2.join(process.cwd(), agent.projectConfigPath);
@@ -589,11 +583,6 @@ async function handleExistingConfig(apiKey, options) {
589
583
  label: "Configure access control",
590
584
  hint: "permissions, connections, actions"
591
585
  });
592
- actionOptions.push({
593
- value: "install-mcp",
594
- label: "Install MCP server",
595
- hint: "not recommended \u2014 use skills instead"
596
- });
597
586
  actionOptions.push({
598
587
  value: "start-fresh",
599
588
  label: "Start fresh (reconfigure everything)"
@@ -631,10 +620,6 @@ async function handleExistingConfig(apiKey, options) {
631
620
  case "access-control":
632
621
  await configCommand();
633
622
  break;
634
- case "install-mcp":
635
- await promptAndInstallMcp(apiKey, options);
636
- p3.outro("Done.");
637
- break;
638
623
  case "start-fresh":
639
624
  await freshSetup({ yes: true });
640
625
  break;
@@ -859,102 +844,6 @@ function printOnboardingPrompt() {
859
844
  console.log(pc2.cyan(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
860
845
  console.log();
861
846
  }
862
- async function promptAndInstallMcp(apiKey, options) {
863
- const allAgents = getAllAgents();
864
- const agentChoice = await p3.select({
865
- message: "Where do you want to install the MCP?",
866
- options: [
867
- {
868
- value: "all",
869
- label: "All agents",
870
- hint: allAgents.map((a) => a.name).join(", ")
871
- },
872
- ...allAgents.map((agent) => ({
873
- value: agent.id,
874
- label: agent.name
875
- }))
876
- ]
877
- });
878
- if (p3.isCancel(agentChoice)) {
879
- p3.log.info("Skipped MCP installation.");
880
- return;
881
- }
882
- const selectedAgents = agentChoice === "all" ? allAgents : allAgents.filter((a) => a.id === agentChoice);
883
- let scope = "global";
884
- const hasProjectScopeAgent = selectedAgents.some((a) => supportsProjectScope(a));
885
- if (options.global) {
886
- scope = "global";
887
- } else if (options.project) {
888
- scope = "project";
889
- } else if (hasProjectScopeAgent) {
890
- const scopeChoice = await p3.select({
891
- message: "How do you want to install it?",
892
- options: [
893
- {
894
- value: "global",
895
- label: "Global (Recommended)",
896
- hint: "Available in all your projects"
897
- },
898
- {
899
- value: "project",
900
- label: "Project only",
901
- hint: "Creates config files in current directory"
902
- }
903
- ]
904
- });
905
- if (p3.isCancel(scopeChoice)) {
906
- p3.log.info("Skipped MCP installation.");
907
- return;
908
- }
909
- scope = scopeChoice;
910
- }
911
- if (scope === "project") {
912
- const projectAgents = selectedAgents.filter((a) => supportsProjectScope(a));
913
- const nonProjectAgents = selectedAgents.filter((a) => !supportsProjectScope(a));
914
- if (projectAgents.length === 0) {
915
- const supported = allAgents.filter((a) => supportsProjectScope(a)).map((a) => a.name).join(", ");
916
- p3.note(
917
- `${selectedAgents.map((a) => a.name).join(", ")} does not support project-level MCP.
918
- Project scope is supported by: ${supported}`,
919
- "Not Supported"
920
- );
921
- p3.log.warn("Run again and choose global scope or a different agent.");
922
- return;
923
- }
924
- for (const agent of projectAgents) {
925
- const wasInstalled = isMcpInstalled(agent, "project");
926
- installMcpConfig(agent, apiKey, "project");
927
- const configPath = getAgentConfigPath(agent, "project");
928
- const status = wasInstalled ? "updated" : "created";
929
- p3.log.success(`${agent.name}: ${configPath} ${status}`);
930
- }
931
- if (nonProjectAgents.length > 0) {
932
- p3.log.info(`Installing globally for agents without project scope support:`);
933
- for (const agent of nonProjectAgents) {
934
- const wasInstalled = isMcpInstalled(agent, "global");
935
- installMcpConfig(agent, apiKey, "global");
936
- const status = wasInstalled ? "updated" : "installed";
937
- p3.log.success(`${agent.name}: MCP ${status} (global)`);
938
- }
939
- }
940
- const allInstalled = [...projectAgents, ...nonProjectAgents];
941
- updateConfigAgentsList(allInstalled.map((a) => a.id));
942
- p3.note(
943
- pc2.yellow("Project config files can be committed to share with your team.\n") + pc2.yellow("Team members will need their own API key."),
944
- "Tip"
945
- );
946
- return;
947
- }
948
- const installedAgentIds = [];
949
- for (const agent of selectedAgents) {
950
- const wasInstalled = isMcpInstalled(agent, "global");
951
- installMcpConfig(agent, apiKey, "global");
952
- installedAgentIds.push(agent.id);
953
- const status = wasInstalled ? "updated" : "installed";
954
- p3.log.success(`${agent.name}: MCP ${status}`);
955
- }
956
- updateConfigAgentsList(installedAgentIds);
957
- }
958
847
  async function freshSetup(options) {
959
848
  p3.note(`Get your API key at:
960
849
  ${pc2.cyan(getApiKeyUrl())}`, "API Key");
@@ -1001,13 +890,6 @@ ${pc2.cyan(getApiKeyUrl())}`, "API Key");
1001
890
  });
1002
891
  await promptSkillInstall();
1003
892
  await promptConnectIntegrations(apiKey);
1004
- const installMcp = await p3.confirm({
1005
- message: "Install One MCP server to your AI agents? (not recommended)",
1006
- initialValue: false
1007
- });
1008
- if (!p3.isCancel(installMcp) && installMcp) {
1009
- await promptAndInstallMcp(apiKey, options);
1010
- }
1011
893
  p3.note(
1012
894
  `Config saved to: ${pc2.dim(getConfigPath())}`,
1013
895
  "Setup Complete"
@@ -1112,16 +994,6 @@ function maskApiKey(key) {
1112
994
  if (key.length <= 12) return key.slice(0, 8) + "...";
1113
995
  return key.slice(0, 8) + "..." + key.slice(-4);
1114
996
  }
1115
- function updateConfigAgentsList(agentIds) {
1116
- const config = readConfig();
1117
- if (!config) return;
1118
- for (const id of agentIds) {
1119
- if (!config.installedAgents.includes(id)) {
1120
- config.installedAgents.push(id);
1121
- }
1122
- }
1123
- writeConfig(config);
1124
- }
1125
997
 
1126
998
  // src/commands/connection.ts
1127
999
  import * as p4 from "@clack/prompts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withone/cli",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "CLI for managing One",
5
5
  "type": "module",
6
6
  "files": [