@codexhost/cli-darwin-x64 0.6.1 → 0.6.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.
@@ -18298,18 +18298,19 @@ function hostUsage(value, modelId) {
18298
18298
  };
18299
18299
  return Object.keys(usage).length > 0 ? usage : null;
18300
18300
  }
18301
- function normalizedProcessError(stderr, fallback) {
18302
- const diagnostic = sanitizeDiagnosticTail(stderr.trim());
18303
- if (/sign[ -]?in|authenticat|credential|login/iu.test(diagnostic)) {
18301
+ function normalizedProcessError(detail, fallback, exposeDetail = false) {
18302
+ const nativeDetail = detail.trim();
18303
+ const diagnostic = sanitizeDiagnosticTail(nativeDetail);
18304
+ if (/sign[ -]?in|authenticat|credential|login/iu.test(nativeDetail)) {
18304
18305
  return {
18305
18306
  code: "authenticationRequired",
18306
- message: diagnostic || fallback,
18307
+ message: exposeDetail ? nativeDetail || fallback : diagnostic || fallback,
18307
18308
  retryable: false
18308
18309
  };
18309
18310
  }
18310
18311
  return {
18311
18312
  code: "nativeFailure",
18312
- message: fallback,
18313
+ message: exposeDetail && nativeDetail ? `${fallback}: ${nativeDetail}` : fallback,
18313
18314
  retryable: true,
18314
18315
  ...diagnostic ? { stderrTail: diagnostic.slice(-4e3) } : {}
18315
18316
  };
@@ -18793,10 +18794,11 @@ ${line}`).slice(-8e3);
18793
18794
  this.#completeTurn(active, { status: "succeeded", checkpoint }, nativeTurnRef);
18794
18795
  }
18795
18796
  } else {
18796
- const errorDetail = event.result.error?.trim() || active.stderr;
18797
+ const nativeError = event.result.error?.trim();
18798
+ const errorDetail = nativeError || active.stderr;
18797
18799
  this.#completeTurn(active, {
18798
18800
  status: "failed",
18799
- error: normalizedProcessError(errorDetail, `Antigravity Turn ended with status ${event.result.status}`),
18801
+ error: normalizedProcessError(errorDetail, `Antigravity Turn ended with status ${event.result.status}`, nativeError !== void 0),
18800
18802
  checkpoint
18801
18803
  }, nativeTurnRef);
18802
18804
  }