@ganakailabs/cloudeval-cli 0.26.10 → 0.26.11

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.
@@ -38,10 +38,10 @@ import {
38
38
  } from "./chunk-2OLI5VOG.js";
39
39
  import {
40
40
  Banner
41
- } from "./chunk-MDLBOB5A.js";
41
+ } from "./chunk-XBVIBHTB.js";
42
42
  import {
43
43
  CLI_VERSION
44
- } from "./chunk-IVGJTC5I.js";
44
+ } from "./chunk-Y5L2F7X3.js";
45
45
  import {
46
46
  raisedButtonStyle,
47
47
  terminalTheme
@@ -3,8 +3,8 @@ import {
3
3
  bannerMetaColor,
4
4
  bannerSegmentColor,
5
5
  splitBannerLineSegments
6
- } from "./chunk-MDLBOB5A.js";
7
- import "./chunk-IVGJTC5I.js";
6
+ } from "./chunk-XBVIBHTB.js";
7
+ import "./chunk-Y5L2F7X3.js";
8
8
  import "./chunk-ZDKRIOMB.js";
9
9
  export {
10
10
  Banner,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CLI_VERSION
3
- } from "./chunk-IVGJTC5I.js";
3
+ } from "./chunk-Y5L2F7X3.js";
4
4
  import {
5
5
  shouldUseColor,
6
6
  terminalTheme
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var CLI_VERSION = "0.26.10";
2
+ var CLI_VERSION = "0.26.11";
3
3
 
4
4
  export {
5
5
  CLI_VERSION
package/dist/cli.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  } from "./chunk-2OLI5VOG.js";
37
37
  import {
38
38
  CLI_VERSION
39
- } from "./chunk-IVGJTC5I.js";
39
+ } from "./chunk-Y5L2F7X3.js";
40
40
 
41
41
  // src/runtime/prepareInk.ts
42
42
  import fs from "fs";
@@ -2920,7 +2920,22 @@ var buildAiSummaryPrompt = (data) => [
2920
2920
  `Validation: ${formatValidation(data.gate?.validation)}`,
2921
2921
  Array.isArray(data.gate?.failures) && data.gate.failures.length ? `Gate failures: ${data.gate.failures.join("; ")}` : "Gate failures: none reported"
2922
2922
  ].join("\n");
2923
- var generateAiSummary = async ({
2923
+ var isTransientAiSummaryText = (text) => {
2924
+ if (!text?.trim()) {
2925
+ return false;
2926
+ }
2927
+ return /too many requests|rate[- ]?limit|try again in a moment|temporarily unavailable/i.test(
2928
+ text
2929
+ );
2930
+ };
2931
+ var aiSummaryRetryDelaysMs = () => {
2932
+ const raw = process.env.CLOUDEVAL_REVIEW_AI_RETRY_DELAYS_MS;
2933
+ if (raw?.trim()) {
2934
+ return raw.split(",").map((value) => Number.parseInt(value.trim(), 10)).filter((value) => Number.isFinite(value) && value >= 0);
2935
+ }
2936
+ return [5e3, 15e3];
2937
+ };
2938
+ var generateAiSummaryAttempt = async ({
2924
2939
  baseUrl,
2925
2940
  token,
2926
2941
  user,
@@ -2977,6 +2992,7 @@ var generateAiSummary = async ({
2977
2992
  const finalMessage = [...chatState.messages ?? []].reverse().find((message) => message.role === "assistant");
2978
2993
  return {
2979
2994
  enabled: true,
2995
+ status: "ok",
2980
2996
  mode,
2981
2997
  ...mode === "agent" ? { agentProfileId: agentProfileId ?? "architecture" } : {},
2982
2998
  ...model ? { model } : {},
@@ -2984,6 +3000,34 @@ var generateAiSummary = async ({
2984
3000
  threadId
2985
3001
  };
2986
3002
  };
3003
+ var generateAiSummary = async (input) => {
3004
+ const retryDelays = aiSummaryRetryDelaysMs();
3005
+ let lastResult;
3006
+ for (let attemptIndex = 0; attemptIndex <= retryDelays.length; attemptIndex += 1) {
3007
+ const result = await generateAiSummaryAttempt(input);
3008
+ result.attempts = attemptIndex + 1;
3009
+ lastResult = result;
3010
+ if (!isTransientAiSummaryText(result.markdown)) {
3011
+ return result;
3012
+ }
3013
+ const retryDelay = retryDelays[attemptIndex];
3014
+ if (retryDelay === void 0) {
3015
+ break;
3016
+ }
3017
+ await sleep2(retryDelay);
3018
+ }
3019
+ return {
3020
+ ...lastResult ?? {},
3021
+ enabled: true,
3022
+ status: "unavailable",
3023
+ mode: input.mode,
3024
+ ...input.mode === "agent" ? { agentProfileId: input.agentProfileId ?? "architecture" } : {},
3025
+ ...input.model ? { model: input.model } : {},
3026
+ attempts: lastResult?.attempts ?? retryDelays.length + 1,
3027
+ error: lastResult?.markdown || "AI summary unavailable",
3028
+ markdown: "AI summary unavailable: CloudEval AI was rate-limited. Retry the workflow or rerun `cloudeval review`."
3029
+ };
3030
+ };
2987
3031
  var buildMarkdownSummary = (data) => {
2988
3032
  const gateStatus = String(data.gate?.status ?? "unknown").toUpperCase();
2989
3033
  const score = data.gate?.overallScore ?? "unknown";
@@ -15045,7 +15089,7 @@ program.command("tui").description("Open the CloudEval Terminal UI").option(
15045
15089
  const { assertSecureBaseUrl } = await import("./dist-MQQKC6DZ.js");
15046
15090
  const [{ render }, { App }] = await Promise.all([
15047
15091
  import("ink"),
15048
- import("./App-RQYQISZ6.js")
15092
+ import("./App-VZXTX4H7.js")
15049
15093
  ]);
15050
15094
  const baseUrl = await resolveBaseUrl(options, command);
15051
15095
  assertSecureBaseUrl(baseUrl);
@@ -15103,7 +15147,7 @@ program.command("chat").description("Start an interactive chat session").option(
15103
15147
  const { assertSecureBaseUrl } = await import("./dist-MQQKC6DZ.js");
15104
15148
  const [{ render }, { App }] = await Promise.all([
15105
15149
  import("ink"),
15106
- import("./App-RQYQISZ6.js")
15150
+ import("./App-VZXTX4H7.js")
15107
15151
  ]);
15108
15152
  const baseUrl = await resolveBaseUrl(options, command);
15109
15153
  assertSecureBaseUrl(baseUrl);
@@ -15857,7 +15901,7 @@ Error: ${errorMsg}
15857
15901
  program.command("banner").description("Preview the startup banner and terminal capabilities").action(async () => {
15858
15902
  const { render } = await import("ink");
15859
15903
  const BannerPreview = React.lazy(async () => ({
15860
- default: (await import("./Banner-AMIGQPVN.js")).Banner
15904
+ default: (await import("./Banner-URKZ37H4.js")).Banner
15861
15905
  }));
15862
15906
  render(
15863
15907
  /* @__PURE__ */ jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(BannerPreview, { disable: false }) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganakailabs/cloudeval-cli",
3
- "version": "0.26.10",
3
+ "version": "0.26.11",
4
4
  "license": "LicenseRef-CloudEval-CLI",
5
5
  "type": "module",
6
6
  "description": "CloudEval CLI for cloud architecture, cost, report, automation, and MCP workflows.",
package/sbom.spdx.json CHANGED
@@ -14,7 +14,7 @@
14
14
  {
15
15
  "SPDXID": "SPDXRef-Package-CloudEval-CLI",
16
16
  "name": "CloudEval CLI",
17
- "versionInfo": "0.26.10",
17
+ "versionInfo": "0.26.11",
18
18
  "downloadLocation": "https://github.com/ganakailabs/cloudeval-cli",
19
19
  "filesAnalyzed": false,
20
20
  "licenseConcluded": "LicenseRef-CloudEval-CLI",