@getpochi/cli 0.5.75 → 0.5.76

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/cli.js +10 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -404610,7 +404610,7 @@ var {
404610
404610
  // package.json
404611
404611
  var package_default = {
404612
404612
  name: "@getpochi/cli",
404613
- version: "0.5.75",
404613
+ version: "0.5.76",
404614
404614
  type: "module",
404615
404615
  bin: {
404616
404616
  pochi: "src/cli.ts"
@@ -431006,21 +431006,24 @@ async function initializeMcp(program5) {
431006
431006
  }
431007
431007
  const spinner = ora("Initializing MCP connections...").start();
431008
431008
  let attempts = 0;
431009
- const maxAttempts = 15;
431009
+ const maxAttempts = 3;
431010
431010
  while (attempts < maxAttempts) {
431011
431011
  const status3 = mcpHub.status.value;
431012
431012
  const connections = Object.values(status3.connections);
431013
431013
  const readyConnections = connections.filter((conn) => conn.status === "ready").length;
431014
431014
  const errorConnections = connections.filter((conn) => conn.status === "error").length;
431015
- if (errorConnections > 0) {
431016
- spinner.fail(`Failed to initialize MCP connections after ${attempts} attempts.`);
431017
- return program5.error("MCP initialization failed");
431018
- }
431019
431015
  if (readyConnections >= connections.length) {
431020
431016
  break;
431021
431017
  }
431018
+ if (errorConnections > 0) {
431019
+ if (attempts < maxAttempts) {
431020
+ attempts++;
431021
+ } else {
431022
+ spinner.fail(`Failed to initialize MCP connections after ${attempts} attempts.`);
431023
+ return program5.error("MCP initialization failed");
431024
+ }
431025
+ }
431022
431026
  await new Promise((resolve11) => setTimeout(resolve11, 500));
431023
- attempts++;
431024
431027
  }
431025
431028
  spinner.stop();
431026
431029
  return mcpHub;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpochi/cli",
3
- "version": "0.5.75",
3
+ "version": "0.5.76",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pochi": "dist/cli.js"