@evident-ai/cli 3.6.1-dev.bea1fa4 → 3.6.1-dev.c4b402e

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.
package/dist/index.js CHANGED
@@ -2135,14 +2135,15 @@ function printLink(options, url, reason) {
2135
2135
  printWarning(reason ?? "Open this authorization URL in your browser:");
2136
2136
  console.log(url.href);
2137
2137
  }
2138
- function printResult(options, proxyId, connectionId, error2, successMessage = "MCP connection authorized.") {
2138
+ function printResult(options, proxyId, connectionId, error2, successMessage = "MCP connection authorized.", reason) {
2139
2139
  if (options.json) {
2140
2140
  console.log(
2141
2141
  JSON.stringify({
2142
2142
  ok: !error2,
2143
2143
  proxy_id: proxyId,
2144
2144
  connection_id: connectionId,
2145
- ...error2 ? { error: error2 } : {}
2145
+ ...error2 ? { error: error2 } : {},
2146
+ ...reason ? { reason } : {}
2146
2147
  })
2147
2148
  );
2148
2149
  } else if (error2) {
@@ -2250,6 +2251,7 @@ async function authorizeMcpConnection(proxyId, connectionId, options = {}) {
2250
2251
  let closeFailureLogged = false;
2251
2252
  let failure;
2252
2253
  let successMessage = "MCP connection authorized.";
2254
+ let completionReason;
2253
2255
  const cancelController = new AbortController();
2254
2256
  const closeListener = (force = false) => {
2255
2257
  if (!server || closePromise) return closePromise ?? Promise.resolve();
@@ -2401,6 +2403,7 @@ async function authorizeMcpConnection(proxyId, connectionId, options = {}) {
2401
2403
  );
2402
2404
  if (completion.outcome === "success") {
2403
2405
  if (completion.reason === "tools_pending") {
2406
+ completionReason = completion.reason;
2404
2407
  page.phase = "tools_pending";
2405
2408
  reportProgress(
2406
2409
  options,
@@ -2439,7 +2442,7 @@ async function authorizeMcpConnection(proxyId, connectionId, options = {}) {
2439
2442
  failure ??= "The local callback listener could not be closed cleanly. Check for a lingering process and retry.";
2440
2443
  }
2441
2444
  }
2442
- printResult(options, proxyId, connectionId, failure, successMessage);
2445
+ printResult(options, proxyId, connectionId, failure, successMessage, completionReason);
2443
2446
  if (failure) process.exitCode = cancelController.signal.aborted ? 130 : 1;
2444
2447
  }
2445
2448
 
@@ -2452,7 +2455,7 @@ import ora4 from "ora";
2452
2455
  import { select as select4 } from "@inquirer/prompts";
2453
2456
 
2454
2457
  // src/lib/telemetry.ts
2455
- var CLI_VERSION = (true ? "3.6.1-dev.bea1fa4" : void 0) ?? process.env.npm_package_version ?? "unknown";
2458
+ var CLI_VERSION = (true ? "3.6.1-dev.c4b402e" : void 0) ?? process.env.npm_package_version ?? "unknown";
2456
2459
  function getCliVersion() {
2457
2460
  return CLI_VERSION;
2458
2461
  }