@jive-ai/cli 0.0.4 → 0.0.6

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.mjs +41 -16
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -645,7 +645,9 @@ async function initCommand() {
645
645
  try {
646
646
  spinner.text = "Scanning for existing MCP servers...";
647
647
  const mcpConfig = await getMcpConfig();
648
- let uploadedServers = 0;
648
+ const currentMcpServers = await apiClient$1.getMcpServers(teamId);
649
+ let uploadedServers = [];
650
+ let skippedServers = [];
649
651
  if (mcpConfig?.mcpServers) {
650
652
  const serverNames = Object.keys(mcpConfig.mcpServers).filter((name) => name !== "jive-mcp");
651
653
  if (serverNames.length > 0) {
@@ -653,12 +655,21 @@ async function initCommand() {
653
655
  for (const name of serverNames) {
654
656
  const serverConfig = mcpConfig.mcpServers[name];
655
657
  try {
656
- await apiClient$1.createMcpServer(teamId, {
658
+ if (currentMcpServers.some((s) => s.name === name)) skippedServers.push({
657
659
  name,
658
- description: `Imported from local .mcp.json`,
659
- config: serverConfig
660
+ id: currentMcpServers.find((s) => s.name === name)?.id || ""
660
661
  });
661
- uploadedServers++;
662
+ else {
663
+ const created = await apiClient$1.createMcpServer(teamId, {
664
+ name,
665
+ description: `Imported from local .mcp.json`,
666
+ config: serverConfig
667
+ });
668
+ uploadedServers.push({
669
+ name,
670
+ id: created.id
671
+ });
672
+ }
662
673
  } catch (error) {
663
674
  console.warn(chalk.gray(`\nWarning: Could not upload MCP server "${name}": ${error.message}`));
664
675
  }
@@ -667,22 +678,30 @@ async function initCommand() {
667
678
  }
668
679
  spinner.text = "Scanning for existing subagents...";
669
680
  const subagentFiles = await getSubagentFiles();
681
+ const currentSubagents = await apiClient$1.getSubagents(teamId);
670
682
  let uploadedSubagents = [];
683
+ let skippedSubagents = [];
671
684
  if (subagentFiles.length > 0) {
672
685
  spinner.text = `Found ${subagentFiles.length} subagent(s), uploading...`;
673
686
  for (const subagent of subagentFiles) {
674
687
  if (subagent.name === "subagent-runner") continue;
675
688
  try {
676
- const created = await apiClient$1.createSubagent(teamId, {
677
- name: subagent.name,
678
- description: subagent.description,
679
- prompt: subagent.prompt
680
- });
681
- await updateSubagentJiveId(subagent.name, created.id);
682
- uploadedSubagents.push({
689
+ if (currentSubagents.some((s) => s.name === subagent.name)) skippedSubagents.push({
683
690
  name: subagent.name,
684
- id: created.id
691
+ id: currentSubagents.find((s) => s.name === subagent.name)?.id || ""
685
692
  });
693
+ else {
694
+ const created = await apiClient$1.createSubagent(teamId, {
695
+ name: subagent.name,
696
+ description: subagent.description,
697
+ prompt: subagent.prompt
698
+ });
699
+ await updateSubagentJiveId(subagent.name, created.id);
700
+ uploadedSubagents.push({
701
+ name: subagent.name,
702
+ id: created.id
703
+ });
704
+ }
686
705
  } catch (error) {
687
706
  console.warn(chalk.gray(`\nWarning: Could not upload subagent "${subagent.name}": ${error.message}`));
688
707
  }
@@ -712,9 +731,11 @@ async function initCommand() {
712
731
  });
713
732
  spinner.succeed(chalk.green("Project initialized successfully!"));
714
733
  console.log(chalk.bold("\nšŸ“¦ Summary:\n"));
715
- if (uploadedServers > 0) console.log(chalk.green(` āœ“ Uploaded ${uploadedServers} MCP server(s) to team`));
734
+ if (uploadedServers.length > 0) console.log(chalk.green(` āœ“ Uploaded ${uploadedServers.length} MCP server(s) to team`));
735
+ if (skippedServers.length > 0) console.log(chalk.yellow(` ⚠ Skipped ${skippedServers.length} MCP server(s) (already exist)`));
716
736
  if (uploadedSubagents.length > 0) console.log(chalk.green(` āœ“ Uploaded ${uploadedSubagents.length} subagent(s) to team`));
717
- console.log(chalk.green(" āœ“ Added @jive/mcp server to .mcp.json"));
737
+ if (skippedSubagents.length > 0) console.log(chalk.yellow(` ⚠ Skipped ${skippedSubagents.length} subagent(s) (already exist)`));
738
+ console.log(chalk.green(" āœ“ Added Jive MCP server to .mcp.json"));
718
739
  console.log(chalk.green(" āœ“ Created .claude/agents/subagent-runner.md"));
719
740
  console.log(chalk.green(" āœ“ Created .jive/config.json"));
720
741
  console.log(chalk.green(" āœ“ Updated .gitignore"));
@@ -2072,10 +2093,14 @@ async function checkTeamMembership() {
2072
2093
  }
2073
2094
  }
2074
2095
 
2096
+ //#endregion
2097
+ //#region package.json
2098
+ var version = "0.0.6";
2099
+
2075
2100
  //#endregion
2076
2101
  //#region src/index.ts
2077
2102
  const program = new Command();
2078
- program.name("jive").description("CLI tool for managing MCP servers, tools, and subagents across teams").version("0.1.0");
2103
+ program.name("jive").description("CLI tool for managing MCP servers, tools, and subagents across teams").version(version);
2079
2104
  program.command("login").description("Authenticate with the Jive platform").action(loginCommand);
2080
2105
  program.command("signup").description("Create a new account").action(signupCommand);
2081
2106
  program.command("logout").description("Clear authentication credentials").action(logoutCommand);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@jive-ai/cli",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "dist",