@ganakailabs/cloudeval-cli 0.29.0 → 0.29.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.
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-CS4NE336.js";
9
9
  import {
10
10
  Onboarding
11
- } from "./chunk-DHSRVVGH.js";
11
+ } from "./chunk-4OE4CRKD.js";
12
12
  import {
13
13
  checkUserStatus,
14
14
  completeActiveAssistantMessage,
@@ -35,13 +35,13 @@ import {
35
35
  reduceChunk,
36
36
  runReports,
37
37
  streamChat
38
- } from "./chunk-Z3REBOP5.js";
38
+ } from "./chunk-ERGQHMNT.js";
39
39
  import {
40
40
  Banner
41
- } from "./chunk-ILKR22AS.js";
41
+ } from "./chunk-YAD6SGBL.js";
42
42
  import {
43
43
  CLI_VERSION
44
- } from "./chunk-SLZ2XYAT.js";
44
+ } from "./chunk-FWCQ4PWL.js";
45
45
  import {
46
46
  raisedButtonStyle,
47
47
  terminalTheme
@@ -5914,7 +5914,7 @@ var getUserIdentityFromToken = async (token) => {
5914
5914
  return { name: "You" };
5915
5915
  }
5916
5916
  try {
5917
- const { extractEmailFromToken } = await import("./dist-V2L4CPTU.js");
5917
+ const { extractEmailFromToken } = await import("./dist-QYIPN7MD.js");
5918
5918
  const email = extractEmailFromToken(token) ?? void 0;
5919
5919
  return {
5920
5920
  name: getFirstNameForDisplay({ email }),
@@ -7350,7 +7350,7 @@ var App = ({
7350
7350
  setIsLoggingIn(true);
7351
7351
  setLoaderStep(1);
7352
7352
  try {
7353
- const { login } = await import("./dist-V2L4CPTU.js");
7353
+ const { login } = await import("./dist-QYIPN7MD.js");
7354
7354
  const newToken = await login(baseUrl, {
7355
7355
  headless: Boolean(process.env.SSH_TTY || process.env.CI)
7356
7356
  });
@@ -3,8 +3,8 @@ import {
3
3
  bannerMetaColor,
4
4
  bannerSegmentColor,
5
5
  splitBannerLineSegments
6
- } from "./chunk-ILKR22AS.js";
7
- import "./chunk-SLZ2XYAT.js";
6
+ } from "./chunk-YAD6SGBL.js";
7
+ import "./chunk-FWCQ4PWL.js";
8
8
  import "./chunk-ZDKRIOMB.js";
9
9
  export {
10
10
  Banner,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Onboarding
3
- } from "./chunk-DHSRVVGH.js";
4
- import "./chunk-Z3REBOP5.js";
3
+ } from "./chunk-4OE4CRKD.js";
4
+ import "./chunk-ERGQHMNT.js";
5
5
  import "./chunk-ZDKRIOMB.js";
6
6
  export {
7
7
  Onboarding
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  completeOnboarding
3
- } from "./chunk-Z3REBOP5.js";
3
+ } from "./chunk-ERGQHMNT.js";
4
4
  import {
5
5
  terminalTheme
6
6
  } from "./chunk-ZDKRIOMB.js";
@@ -1511,6 +1511,15 @@ var extractEmailFromToken = (token) => {
1511
1511
  }
1512
1512
  };
1513
1513
  var AUTH_LOOKUP_ERROR = "CloudEvalAuthLookupError";
1514
+ var USER_PROFILE_MISSING_PATTERN = /USER_NOT_FOUND|CloudEval user profile not found|onboarding required/i;
1515
+ var isMissingUserProfileDetail = (detail) => USER_PROFILE_MISSING_PATTERN.test(detail ?? "");
1516
+ var authLookupErrorFromDetail = (response, context, detail) => {
1517
+ const status = [response.status, response.statusText].filter(Boolean).join(" ");
1518
+ const suffix = detail ? ` - ${detail.slice(0, 300)}` : "";
1519
+ const error = new Error(`${context} failed: ${status}${suffix}`);
1520
+ error.name = AUTH_LOOKUP_ERROR;
1521
+ return error;
1522
+ };
1514
1523
  var authLookupError = async (response, context) => {
1515
1524
  let detail = "";
1516
1525
  try {
@@ -1553,6 +1562,13 @@ var fetchCurrentUserFromServer = async (apiBase, token) => {
1553
1562
  if (response.status === 401 || response.status === 403) {
1554
1563
  throw await authLookupError(response, "Current user lookup");
1555
1564
  }
1565
+ if (response.status === 404) {
1566
+ const detail = await readResponseDetail(response);
1567
+ if (isMissingUserProfileDetail(detail)) {
1568
+ throw authLookupErrorFromDetail(response, "Current user lookup", detail);
1569
+ }
1570
+ return null;
1571
+ }
1556
1572
  if (!response.ok) {
1557
1573
  return null;
1558
1574
  }
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var CLI_VERSION = "0.29.0";
2
+ var CLI_VERSION = "0.29.2";
3
3
 
4
4
  export {
5
5
  CLI_VERSION
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CLI_VERSION
3
- } from "./chunk-SLZ2XYAT.js";
3
+ } from "./chunk-FWCQ4PWL.js";
4
4
  import {
5
5
  shouldUseColor,
6
6
  terminalTheme
package/dist/cli.js CHANGED
@@ -36,10 +36,10 @@ import {
36
36
  redactSensitiveSecrets,
37
37
  redactSensitiveText,
38
38
  setActiveCLITraceContext
39
- } from "./chunk-Z3REBOP5.js";
39
+ } from "./chunk-ERGQHMNT.js";
40
40
  import {
41
41
  CLI_VERSION
42
- } from "./chunk-SLZ2XYAT.js";
42
+ } from "./chunk-FWCQ4PWL.js";
43
43
 
44
44
  // src/runtime/prepareInk.ts
45
45
  import fs from "fs";
@@ -1680,7 +1680,7 @@ var resolveReportProjectId = async ({
1680
1680
  if (!token) {
1681
1681
  throw new Error("No project specified. Use --project <id> for report access.");
1682
1682
  }
1683
- const resolvedWorkspace = workspace ?? await import("./dist-V2L4CPTU.js").then((core) => ({
1683
+ const resolvedWorkspace = workspace ?? await import("./dist-QYIPN7MD.js").then((core) => ({
1684
1684
  checkUserStatus: core.checkUserStatus,
1685
1685
  getProjects: core.getProjects
1686
1686
  }));
@@ -1709,7 +1709,7 @@ var warnIfAccessKeyFromCliOption = (options, command) => {
1709
1709
  };
1710
1710
  var resolveAuthContext = async (options, command, deps) => {
1711
1711
  const baseUrl = await deps.resolveBaseUrl(options, command);
1712
- const core = await import("./dist-V2L4CPTU.js");
1712
+ const core = await import("./dist-QYIPN7MD.js");
1713
1713
  core.assertSecureBaseUrl(baseUrl);
1714
1714
  warnIfAccessKeyFromCliOption(options, command);
1715
1715
  let accessKey = options.accessKey;
@@ -1795,7 +1795,7 @@ var resolveToken = async (options, baseUrl, deps, command) => {
1795
1795
  if (options.accessKey) {
1796
1796
  return options.accessKey;
1797
1797
  }
1798
- const { getAuthToken } = await import("./dist-V2L4CPTU.js");
1798
+ const { getAuthToken } = await import("./dist-QYIPN7MD.js");
1799
1799
  try {
1800
1800
  return await getAuthToken({
1801
1801
  accessKey: options.accessKey,
@@ -1806,7 +1806,7 @@ var resolveToken = async (options, baseUrl, deps, command) => {
1806
1806
  if (!canLogin) {
1807
1807
  throw error;
1808
1808
  }
1809
- const { login } = await import("./dist-V2L4CPTU.js");
1809
+ const { login } = await import("./dist-QYIPN7MD.js");
1810
1810
  process.stderr.write("Authentication required. Starting login flow...\n");
1811
1811
  const token = await login(baseUrl, {
1812
1812
  headless: Boolean(process.env.SSH_TTY || process.env.CLOUDEVAL_HEADLESS_LOGIN)
@@ -1972,7 +1972,7 @@ var registerReportsCommand = (program2, deps) => {
1972
1972
  token,
1973
1973
  requestedProjectId: options.project
1974
1974
  });
1975
- const core = await import("./dist-V2L4CPTU.js");
1975
+ const core = await import("./dist-QYIPN7MD.js");
1976
1976
  const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
1977
1977
  const reports2 = await core.listReports({
1978
1978
  baseUrl,
@@ -1994,7 +1994,7 @@ var registerReportsCommand = (program2, deps) => {
1994
1994
  try {
1995
1995
  const baseUrl = await deps.resolveBaseUrl(options, command);
1996
1996
  const token = await resolveToken(options, baseUrl, deps, command);
1997
- const core = await import("./dist-V2L4CPTU.js");
1997
+ const core = await import("./dist-QYIPN7MD.js");
1998
1998
  const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
1999
1999
  const projectId = await resolveReportProjectId({
2000
2000
  baseUrl,
@@ -2097,7 +2097,7 @@ var registerReportsCommand = (program2, deps) => {
2097
2097
  try {
2098
2098
  const baseUrl = await deps.resolveBaseUrl(options, command);
2099
2099
  const token = await resolveToken(options, baseUrl, deps, command);
2100
- const core = await import("./dist-V2L4CPTU.js");
2100
+ const core = await import("./dist-QYIPN7MD.js");
2101
2101
  const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
2102
2102
  const projectId = await resolveReportProjectId({
2103
2103
  baseUrl,
@@ -2167,7 +2167,7 @@ var registerReportsCommand = (program2, deps) => {
2167
2167
  token,
2168
2168
  requestedProjectId: options.project
2169
2169
  });
2170
- const core = await import("./dist-V2L4CPTU.js");
2170
+ const core = await import("./dist-QYIPN7MD.js");
2171
2171
  const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
2172
2172
  const report = await core.getWafReport({
2173
2173
  baseUrl,
@@ -2206,7 +2206,7 @@ var registerReportsCommand = (program2, deps) => {
2206
2206
  token,
2207
2207
  requestedProjectId: options.project
2208
2208
  });
2209
- const core = await import("./dist-V2L4CPTU.js");
2209
+ const core = await import("./dist-QYIPN7MD.js");
2210
2210
  const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
2211
2211
  const report = await core.getReport({
2212
2212
  baseUrl,
@@ -2234,7 +2234,7 @@ var registerReportsCommand = (program2, deps) => {
2234
2234
  token,
2235
2235
  requestedProjectId: options.project
2236
2236
  });
2237
- const core = await import("./dist-V2L4CPTU.js");
2237
+ const core = await import("./dist-QYIPN7MD.js");
2238
2238
  const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
2239
2239
  const report = await core.getCostReport({
2240
2240
  baseUrl,
@@ -2263,7 +2263,7 @@ var registerReportsCommand = (program2, deps) => {
2263
2263
  token,
2264
2264
  requestedProjectId: options.project
2265
2265
  });
2266
- const core = await import("./dist-V2L4CPTU.js");
2266
+ const core = await import("./dist-QYIPN7MD.js");
2267
2267
  const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
2268
2268
  const report = await core.getWafReport({
2269
2269
  baseUrl,
@@ -3604,6 +3604,11 @@ var buildMarkdownSummary = (data) => {
3604
3604
  { maxRows: 5, remainderLabel: "Unallocated" }
3605
3605
  );
3606
3606
  const positiveResourceCosts = resourceCostRows.filter((resource) => resource.amount > 0);
3607
+ const namedResourceCosts = positiveResourceCosts.filter(
3608
+ (resource) => resource.name !== "Unallocated"
3609
+ );
3610
+ const costPieRows = namedResourceCosts.length ? positiveResourceCosts : costServices.filter((service) => service.amount > 0);
3611
+ const costPieTitle = namedResourceCosts.length ? "Monthly cost by resource" : "Monthly cost by service";
3607
3612
  const openLinks = openInCloudEvalLines(data.links);
3608
3613
  const architectureLines = architectureSignalLines({
3609
3614
  architecture,
@@ -3666,13 +3671,13 @@ var buildMarkdownSummary = (data) => {
3666
3671
  `- Estimated savings: **${formatMonthlyMoney(data.gate.cost.estimatedSavings.amount, data.gate.cost.estimatedSavings.currency)}**`
3667
3672
  );
3668
3673
  }
3669
- if (positiveResourceCosts.length) {
3674
+ if (costPieRows.length) {
3670
3675
  costLines.push(
3671
3676
  "",
3672
3677
  "```mermaid",
3673
- "pie title Monthly cost by resource",
3674
- ...positiveResourceCosts.map(
3675
- (resource) => ` "${mermaidLabel(resource.name)}" : ${trimNumber(resource.amount, 3)}`
3678
+ `pie title ${costPieTitle}`,
3679
+ ...costPieRows.map(
3680
+ (row) => ` "${mermaidLabel(row.name)}" : ${trimNumber(row.amount, 3)}`
3676
3681
  ),
3677
3682
  "```"
3678
3683
  );
@@ -5244,7 +5249,7 @@ var runChatRecipe = async (recipe, prompt2, options, command, deps) => {
5244
5249
  });
5245
5250
  progressWriter.write({ type: "auth", step: "auth", message: "Resolving authentication" });
5246
5251
  const context = await resolveAuthContext(options, command, deps);
5247
- const core = await import("./dist-V2L4CPTU.js");
5252
+ const core = await import("./dist-QYIPN7MD.js");
5248
5253
  progressWriter.write({
5249
5254
  type: "request",
5250
5255
  step: "project",
@@ -6808,7 +6813,7 @@ var configureDiagramExportCommand = (command, deps) => addAuthOptions(command, d
6808
6813
  const context = requireAuthUser(
6809
6814
  await resolveAuthContext(options, actionCommand, deps)
6810
6815
  );
6811
- const core = await import("./dist-V2L4CPTU.js");
6816
+ const core = await import("./dist-QYIPN7MD.js");
6812
6817
  const projects = await core.getProjects(
6813
6818
  context.baseUrl,
6814
6819
  context.token,
@@ -6885,7 +6890,7 @@ var registerProjectsCommand = (program2, deps) => {
6885
6890
  addCommon(addAuthOptions(projects.command("list").description("List projects"), deps.defaultBaseUrl)).action(async (options, command) => {
6886
6891
  try {
6887
6892
  const context = await resolveAuthContext(options, command, deps);
6888
- const core = await import("./dist-V2L4CPTU.js");
6893
+ const core = await import("./dist-QYIPN7MD.js");
6889
6894
  const data = await listProjectsForContext(core, context);
6890
6895
  const url = buildFrontendUrl({ baseUrl: frontendBase(context, options), target: "projects" });
6891
6896
  await writeProjectListOutput({ data, options, frontendUrl: url });
@@ -6903,7 +6908,7 @@ var registerProjectsCommand = (program2, deps) => {
6903
6908
  ).action(async (id, options, command) => {
6904
6909
  try {
6905
6910
  const context = await resolveAuthContext(options, command, deps);
6906
- const core = await import("./dist-V2L4CPTU.js");
6911
+ const core = await import("./dist-QYIPN7MD.js");
6907
6912
  const list = await listProjectsForContext(core, context);
6908
6913
  const data = list.find((project) => project.id === id);
6909
6914
  if (!data) {
@@ -6972,7 +6977,7 @@ var registerProjectsCommand = (program2, deps) => {
6972
6977
  try {
6973
6978
  assertSingleProjectSource(options);
6974
6979
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
6975
- const core = await import("./dist-V2L4CPTU.js");
6980
+ const core = await import("./dist-QYIPN7MD.js");
6976
6981
  const template = await fileBlob(options.templateFile);
6977
6982
  const parameters = await fileBlob(options.parametersFile);
6978
6983
  const workspace = options.workspaceDir ? await collectWorkspaceFiles(options.workspaceDir, options) : void 0;
@@ -7097,7 +7102,7 @@ var registerIssuesInventoryCommand = (program2, deps) => {
7097
7102
  addCommon2(addAuthOptions(inventory.command("list").description("List issues inventory items"), deps.defaultBaseUrl)).option("--project <id>", "Filter by project id").option("--type <types>", "Filter by type: architecture,cost,unit-tests").option("--severity <levels>", "Filter by severity: critical,high,medium,low").option("--pillar <pillars>", "Filter by pillar").option("--category <categories>", "Filter by category").option("--resource-type <types>", "Filter by resource type").option("--q <query>", "Search query").option("--min-monthly-savings <amount>", "Minimum monthly savings for cost items").option("--sort <sort>", "Sort: priority, severity, savings, project", "priority").option("--limit <n>", "Page size (1-500)", "50").option("--offset <n>", "Page offset", "0").option("--allow-full-scan", "Allow scanning large portfolios without project filter", true).option("--no-allow-full-scan", "Require project scoping for large portfolios").action(async (options, command) => {
7098
7103
  try {
7099
7104
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7100
- const core = await import("./dist-V2L4CPTU.js");
7105
+ const core = await import("./dist-QYIPN7MD.js");
7101
7106
  const data = await core.listIssuesItems({
7102
7107
  baseUrl: context.baseUrl,
7103
7108
  authToken: context.token,
@@ -7145,7 +7150,7 @@ var registerIssuesInventoryCommand = (program2, deps) => {
7145
7150
  addCommon2(addAuthOptions(inventory.command("get <item-id>").description("Get one issues inventory item"), deps.defaultBaseUrl)).option("--project <id>", "Optional project scope").option("--allow-full-scan", "Allow scanning large portfolios", true).option("--no-allow-full-scan", "Require project scoping for large portfolios").action(async (itemId, options, command) => {
7146
7151
  try {
7147
7152
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7148
- const core = await import("./dist-V2L4CPTU.js");
7153
+ const core = await import("./dist-QYIPN7MD.js");
7149
7154
  const data = await core.getIssuesItem({
7150
7155
  baseUrl: context.baseUrl,
7151
7156
  authToken: context.token,
@@ -7266,7 +7271,7 @@ var registerConnectionsCommand = (program2, deps) => {
7266
7271
  addCommon3(addAuthOptions(connections.command("list").description("List connections"), deps.defaultBaseUrl)).action(async (options, command) => {
7267
7272
  try {
7268
7273
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7269
- const core = await import("./dist-V2L4CPTU.js");
7274
+ const core = await import("./dist-QYIPN7MD.js");
7270
7275
  const data = await core.listConnections({
7271
7276
  baseUrl: context.baseUrl,
7272
7277
  authToken: context.token,
@@ -7291,7 +7296,7 @@ var registerConnectionsCommand = (program2, deps) => {
7291
7296
  ).action(async (id, options, command) => {
7292
7297
  try {
7293
7298
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7294
- const core = await import("./dist-V2L4CPTU.js");
7299
+ const core = await import("./dist-QYIPN7MD.js");
7295
7300
  const data = await core.getConnection({
7296
7301
  baseUrl: context.baseUrl,
7297
7302
  authToken: context.token,
@@ -7628,7 +7633,7 @@ var checkoutReturnUrl = (context, options) => options.returnTo || billingUrl(con
7628
7633
  var runTopUpCheckout = async (commandName, packId, options, command, deps) => {
7629
7634
  try {
7630
7635
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7631
- const core = await import("./dist-V2L4CPTU.js");
7636
+ const core = await import("./dist-QYIPN7MD.js");
7632
7637
  const returnTo = checkoutReturnUrl(context, options);
7633
7638
  const session = await core.createTopUpCheckoutSession({
7634
7639
  baseUrl: context.baseUrl,
@@ -7668,7 +7673,7 @@ var registerBillingCommands = (program2, deps) => {
7668
7673
  ).action(async (options, command) => {
7669
7674
  try {
7670
7675
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7671
- const core = await import("./dist-V2L4CPTU.js");
7676
+ const core = await import("./dist-QYIPN7MD.js");
7672
7677
  const range = rangeToDates("30d");
7673
7678
  const [entitlement, usageSummary] = await Promise.all([
7674
7679
  core.getBillingEntitlement({
@@ -7698,7 +7703,7 @@ var registerBillingCommands = (program2, deps) => {
7698
7703
  addCommon4(addAuthOptions(billing.command("summary").description("Show billing summary"), deps.defaultBaseUrl)).action(async (options, command) => {
7699
7704
  try {
7700
7705
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7701
- const core = await import("./dist-V2L4CPTU.js");
7706
+ const core = await import("./dist-QYIPN7MD.js");
7702
7707
  const range = rangeToDates("30d");
7703
7708
  const [entitlement, subscriptionStatus, usageSummary] = await Promise.all([
7704
7709
  core.getBillingEntitlement({ baseUrl: context.baseUrl, authToken: context.token }),
@@ -7734,7 +7739,7 @@ var registerBillingCommands = (program2, deps) => {
7734
7739
  addCommon4(addAuthOptions(billing.command("plans").description("Show billing plans"), deps.defaultBaseUrl)).action(async (options, command) => {
7735
7740
  try {
7736
7741
  const context = await resolveAuthContext(options, command, deps);
7737
- const core = await import("./dist-V2L4CPTU.js");
7742
+ const core = await import("./dist-QYIPN7MD.js");
7738
7743
  const data = await core.getBillingConfig({ baseUrl: context.baseUrl, authToken: context.token });
7739
7744
  const url = billingUrl(context, { ...options, tab: "plans" });
7740
7745
  await write("billing plans", data, options, url);
@@ -7746,7 +7751,7 @@ var registerBillingCommands = (program2, deps) => {
7746
7751
  addCommon4(addAuthOptions(billing.command("usage").description("Show billing usage summary"), deps.defaultBaseUrl)).option("--range <range>", "Usage range: 7d, 30d, 90d, all", "30d").option("--start-at <iso>", "Start timestamp").option("--end-at <iso>", "End timestamp").option("--granularity <value>", "Granularity: hour, day, month", "day").option("--action-type <type>", "Action type filter").option("--model <name>", "Model filter").option("--outcome <outcome>", "Outcome filter").option("--charge-status <status>", "Charge status filter").action(async (options, command) => {
7747
7752
  try {
7748
7753
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7749
- const core = await import("./dist-V2L4CPTU.js");
7754
+ const core = await import("./dist-QYIPN7MD.js");
7750
7755
  const range = rangeToDates(options.range);
7751
7756
  const data = await core.getBillingUsageSummary({
7752
7757
  baseUrl: context.baseUrl,
@@ -7769,7 +7774,7 @@ var registerBillingCommands = (program2, deps) => {
7769
7774
  addCommon4(addAuthOptions(billing.command("ledger").description("Show billing ledger"), deps.defaultBaseUrl)).option("--range <range>", "Usage range: 7d, 30d, 90d, all", "30d").option("--start-at <iso>", "Start timestamp").option("--end-at <iso>", "End timestamp").option("--action-type <type>", "Action type filter").option("--model <name>", "Model filter").option("--outcome <outcome>", "Outcome filter").option("--charge-status <status>", "Charge status filter").option("--limit <n>", "Page size", "25").option("--cursor <cursor>", "Pagination cursor").action(async (options, command) => {
7770
7775
  try {
7771
7776
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7772
- const core = await import("./dist-V2L4CPTU.js");
7777
+ const core = await import("./dist-QYIPN7MD.js");
7773
7778
  const range = rangeToDates(options.range);
7774
7779
  const data = await core.getBillingUsageLedger({
7775
7780
  baseUrl: context.baseUrl,
@@ -7797,7 +7802,7 @@ var registerBillingCommands = (program2, deps) => {
7797
7802
  addCommon4(addAuthOptions(billing.command(name).description(`Show billing ${name}`), deps.defaultBaseUrl)).option("--limit <n>", "Result limit", "25").action(async (options, command) => {
7798
7803
  try {
7799
7804
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7800
- const core = await import("./dist-V2L4CPTU.js");
7805
+ const core = await import("./dist-QYIPN7MD.js");
7801
7806
  const data = await core[getter]({
7802
7807
  baseUrl: context.baseUrl,
7803
7808
  authToken: context.token,
@@ -7815,7 +7820,7 @@ var registerBillingCommands = (program2, deps) => {
7815
7820
  addCommon4(addAuthOptions(topups, deps.defaultBaseUrl)).option("--limit <n>", "Result limit", "25").action(async (options, command) => {
7816
7821
  try {
7817
7822
  const context = requireAuthUser(await resolveAuthContext(options, command, deps));
7818
- const core = await import("./dist-V2L4CPTU.js");
7823
+ const core = await import("./dist-QYIPN7MD.js");
7819
7824
  const data = await core.getTopUpPacks({
7820
7825
  baseUrl: context.baseUrl,
7821
7826
  authToken: context.token
@@ -10870,7 +10875,7 @@ var reportsFrontendUrl = (config, input) => buildFrontendUrl({
10870
10875
  reportVerbosity: input.reportVerbosity
10871
10876
  });
10872
10877
  var resolveAuth = async (config, options = {}) => {
10873
- const core = await import("./dist-V2L4CPTU.js");
10878
+ const core = await import("./dist-QYIPN7MD.js");
10874
10879
  core.assertSecureBaseUrl(config.baseUrl);
10875
10880
  let token;
10876
10881
  try {
@@ -10966,7 +10971,7 @@ var assertModelAvailable = async (config, token) => {
10966
10971
  if (!config.model) {
10967
10972
  return;
10968
10973
  }
10969
- const core = await import("./dist-V2L4CPTU.js");
10974
+ const core = await import("./dist-QYIPN7MD.js");
10970
10975
  try {
10971
10976
  const response = await fetch(
10972
10977
  `${core.normalizeApiBase(config.baseUrl)}/models`,
@@ -11223,7 +11228,7 @@ var buildToolHandlers = (serverOptions) => {
11223
11228
  });
11224
11229
  handlers.set("agent_profiles_list", async (args) => {
11225
11230
  const config = await resolveInvocationConfig(serverOptions, args);
11226
- const core = await import("./dist-V2L4CPTU.js");
11231
+ const core = await import("./dist-QYIPN7MD.js");
11227
11232
  const data = await listProfilesForDiscovery(core, config.baseUrl);
11228
11233
  return withEnvelope({
11229
11234
  command: "agents list",
@@ -11236,7 +11241,7 @@ var buildToolHandlers = (serverOptions) => {
11236
11241
  throw new Error("profileId is required.");
11237
11242
  }
11238
11243
  const config = await resolveInvocationConfig(serverOptions, args);
11239
- const core = await import("./dist-V2L4CPTU.js");
11244
+ const core = await import("./dist-QYIPN7MD.js");
11240
11245
  const data = await getProfileForDiscovery(core, config.baseUrl, profileId);
11241
11246
  return withEnvelope({
11242
11247
  command: "agents show",
@@ -11882,7 +11887,7 @@ var buildToolHandlers = (serverOptions) => {
11882
11887
  });
11883
11888
  handlers.set("auth_status", async (args) => {
11884
11889
  const config = await resolveInvocationConfig(serverOptions, args);
11885
- const core = await import("./dist-V2L4CPTU.js");
11890
+ const core = await import("./dist-QYIPN7MD.js");
11886
11891
  const data = await core.getAuthStatus(config.baseUrl, { validate: true });
11887
11892
  return withEnvelope({
11888
11893
  command: "auth status",
@@ -11891,7 +11896,7 @@ var buildToolHandlers = (serverOptions) => {
11891
11896
  });
11892
11897
  handlers.set("status", async (args) => {
11893
11898
  const config = await resolveInvocationConfig(serverOptions, args);
11894
- const core = await import("./dist-V2L4CPTU.js");
11899
+ const core = await import("./dist-QYIPN7MD.js");
11895
11900
  const auth = await core.getAuthStatus(config.baseUrl, { validate: true });
11896
11901
  return withEnvelope({
11897
11902
  command: "status",
@@ -11922,7 +11927,7 @@ var buildToolHandlers = (serverOptions) => {
11922
11927
  }
11923
11928
  ];
11924
11929
  try {
11925
- const core = await import("./dist-V2L4CPTU.js");
11930
+ const core = await import("./dist-QYIPN7MD.js");
11926
11931
  core.assertSecureBaseUrl(config.baseUrl);
11927
11932
  checks.push({
11928
11933
  id: "base-url-secure",
@@ -12442,7 +12447,7 @@ var buildToolHandlers = (serverOptions) => {
12442
12447
  } catch {
12443
12448
  token = config.accessKey;
12444
12449
  }
12445
- const core = await import("./dist-V2L4CPTU.js");
12450
+ const core = await import("./dist-QYIPN7MD.js");
12446
12451
  const data = await core.getBillingConfig({
12447
12452
  baseUrl: config.baseUrl,
12448
12453
  authToken: token
@@ -13338,7 +13343,7 @@ var registerCapabilitiesCommand = (program2, deps) => {
13338
13343
  warnIfAccessKeyFromCliOption(options, command);
13339
13344
  let data = capabilities;
13340
13345
  if (options.live) {
13341
- const core = await import("./dist-V2L4CPTU.js");
13346
+ const core = await import("./dist-QYIPN7MD.js");
13342
13347
  const baseUrl = await deps.resolveBaseUrl(options, command);
13343
13348
  const accessKey = options.accessKeyStdin ? await deps.readStdinValue() : options.accessKey;
13344
13349
  const token = await core.getAuthToken({ accessKey, baseUrl });
@@ -13476,7 +13481,7 @@ var writeCredentialOutput = async (input) => {
13476
13481
  };
13477
13482
  var resolveCoreAuth = async (options, command, deps) => {
13478
13483
  const context = await resolveAuthContext(options, command, deps);
13479
- const core = await import("./dist-V2L4CPTU.js");
13484
+ const core = await import("./dist-QYIPN7MD.js");
13480
13485
  return { ...context, core };
13481
13486
  };
13482
13487
  var parseCapabilities = (value) => value?.split(",").map((item) => item.trim()).filter(Boolean);
@@ -13809,7 +13814,7 @@ var registerAgentsCommand = (program2, deps) => {
13809
13814
  const agents = program2.command("agents").description("CloudEval Agent Profile utilities");
13810
13815
  addAgentOutputOptions(agents.command("list").description("List Agent Profiles"), deps).action(async (options, command) => {
13811
13816
  const baseUrl = await deps.resolveBaseUrl(options, command);
13812
- const core = await import("./dist-V2L4CPTU.js");
13817
+ const core = await import("./dist-QYIPN7MD.js");
13813
13818
  core.assertSecureBaseUrl(baseUrl);
13814
13819
  const data = await listProfilesForDiscovery2(core, baseUrl);
13815
13820
  await writeProfiles({
@@ -13825,7 +13830,7 @@ var registerAgentsCommand = (program2, deps) => {
13825
13830
  deps
13826
13831
  ).action(async (profileId, options, command) => {
13827
13832
  const baseUrl = await deps.resolveBaseUrl(options, command);
13828
- const core = await import("./dist-V2L4CPTU.js");
13833
+ const core = await import("./dist-QYIPN7MD.js");
13829
13834
  core.assertSecureBaseUrl(baseUrl);
13830
13835
  const data = await getProfileForDiscovery2(core, baseUrl, profileId);
13831
13836
  await writeProfiles({
@@ -13844,7 +13849,7 @@ var registerAgentsCommand = (program2, deps) => {
13844
13849
  const cliProfile = getActiveConfigProfile(command);
13845
13850
  const cliConfig = await loadCliConfig(cliProfile);
13846
13851
  const auth = await resolveAuthContext(options, command, deps);
13847
- const core = await import("./dist-V2L4CPTU.js");
13852
+ const core = await import("./dist-QYIPN7MD.js");
13848
13853
  const profileResponse = await core.getAgentProfile({
13849
13854
  baseUrl: auth.baseUrl,
13850
13855
  authToken: auth.token,
@@ -14406,7 +14411,7 @@ var registerDiagnosticsCommands = (program2, deps) => {
14406
14411
  const baseUrl = await deps.resolveBaseUrl(options, command);
14407
14412
  const profile = getActiveConfigProfile(command);
14408
14413
  const config = await loadCliConfig(profile);
14409
- const core = await import("./dist-V2L4CPTU.js");
14414
+ const core = await import("./dist-QYIPN7MD.js");
14410
14415
  const auth = await core.getAuthStatus(baseUrl, { validate: true });
14411
14416
  if (options.format === "text" || !options.format) {
14412
14417
  process.stdout.write(
@@ -14456,7 +14461,7 @@ var registerDiagnosticsCommands = (program2, deps) => {
14456
14461
  detail: getCliConfigPath(profile)
14457
14462
  });
14458
14463
  try {
14459
- const core = await import("./dist-V2L4CPTU.js");
14464
+ const core = await import("./dist-QYIPN7MD.js");
14460
14465
  core.assertSecureBaseUrl(baseUrl);
14461
14466
  checks.push({
14462
14467
  id: "base-url-secure",
@@ -14556,7 +14561,7 @@ var resolveToken2 = async (options, deps, baseUrl, command) => {
14556
14561
  return options.accessKey;
14557
14562
  }
14558
14563
  try {
14559
- const core = await import("./dist-V2L4CPTU.js");
14564
+ const core = await import("./dist-QYIPN7MD.js");
14560
14565
  return await core.getAuthToken({
14561
14566
  baseUrl
14562
14567
  });
@@ -14640,7 +14645,7 @@ var registerModelsCommand = (program2, deps) => {
14640
14645
  let source = "fallback";
14641
14646
  let modelList = fallbackModels;
14642
14647
  try {
14643
- const core = await import("./dist-V2L4CPTU.js");
14648
+ const core = await import("./dist-QYIPN7MD.js");
14644
14649
  const response = await fetch(`${core.normalizeApiBase(baseUrl)}/models`, {
14645
14650
  headers: {
14646
14651
  Accept: "application/json",
@@ -15819,7 +15824,7 @@ var uninstallCompletionScript = async (shell) => {
15819
15824
  var runInteractiveLoginOnboarding = async (baseUrl, token) => {
15820
15825
  const [{ render }, { Onboarding }] = await Promise.all([
15821
15826
  import("ink"),
15822
- import("./Onboarding-AFBWD2CE.js")
15827
+ import("./Onboarding-HCORVZMZ.js")
15823
15828
  ]);
15824
15829
  await new Promise((resolve) => {
15825
15830
  let app;
@@ -16153,7 +16158,7 @@ var resolveBaseUrl = async (options, command) => {
16153
16158
  });
16154
16159
  }
16155
16160
  try {
16156
- const { getAuthStatus } = await import("./dist-V2L4CPTU.js");
16161
+ const { getAuthStatus } = await import("./dist-QYIPN7MD.js");
16157
16162
  const status = await getAuthStatus();
16158
16163
  const storedBaseUrl = status.baseUrl;
16159
16164
  if (storedBaseUrl && shouldUseStoredBaseUrl(storedBaseUrl)) {
@@ -16227,7 +16232,7 @@ program.command("login").description("Authenticate with Cloudeval").option(
16227
16232
  checkUserStatus,
16228
16233
  ensurePlaygroundProject,
16229
16234
  login
16230
- } = await import("./dist-V2L4CPTU.js");
16235
+ } = await import("./dist-QYIPN7MD.js");
16231
16236
  assertSecureBaseUrl(options.baseUrl);
16232
16237
  const headlessEnvironment = isHeadlessEnvironment();
16233
16238
  const headlessLogin = options.headless || headlessEnvironment;
@@ -16302,7 +16307,7 @@ program.command("logout").description("Log out and clear stored authentication s
16302
16307
  DEFAULT_BASE_URL
16303
16308
  ).option("--all-devices", "Revoke sessions on all devices", false).action(async (options) => {
16304
16309
  try {
16305
- const { assertSecureBaseUrl, logout } = await import("./dist-V2L4CPTU.js");
16310
+ const { assertSecureBaseUrl, logout } = await import("./dist-QYIPN7MD.js");
16306
16311
  assertSecureBaseUrl(options.baseUrl);
16307
16312
  const result = await logout({
16308
16313
  baseUrl: options.baseUrl,
@@ -16336,7 +16341,7 @@ authCommand.command("status").description("Show current authentication status").
16336
16341
  DEFAULT_BASE_URL
16337
16342
  ).option("--format <format>", "Output format: text, json, ndjson, markdown", "text").option("--show-sensitive-ids", "Show full account/session identifiers in command output", false).option("-v, --verbose", "Enable verbose logging and show full non-token identifiers", false).action(async (options, command) => {
16338
16343
  try {
16339
- const { assertSecureBaseUrl, getAuthStatus } = await import("./dist-V2L4CPTU.js");
16344
+ const { assertSecureBaseUrl, getAuthStatus } = await import("./dist-QYIPN7MD.js");
16340
16345
  const effectiveBaseUrl = await resolveBaseUrl(options, command);
16341
16346
  assertSecureBaseUrl(effectiveBaseUrl);
16342
16347
  const status = await getAuthStatus(effectiveBaseUrl, { validate: true });
@@ -16565,10 +16570,10 @@ program.command("tui").description("Open the CloudEval Terminal UI").option(
16565
16570
  "Access key for automation",
16566
16571
  process.env.CLOUDEVAL_ACCESS_KEY
16567
16572
  ).option("--access-key-stdin", "Read access key from stdin (recommended for automation)", false).option("--model <name>", "Model name").option("--debug", "Log raw chunks", false).option("--health-check", "Enable health check (disabled by default)").option("--no-banner", "Disable ASCII banner").option("--animate", "Enable TUI animations (default)").option("--no-anim", "Disable TUI animations").option("-v, --verbose", "Enable verbose logging", false).action(async (options, command) => {
16568
- const { assertSecureBaseUrl } = await import("./dist-V2L4CPTU.js");
16573
+ const { assertSecureBaseUrl } = await import("./dist-QYIPN7MD.js");
16569
16574
  const [{ render }, { App }] = await Promise.all([
16570
16575
  import("ink"),
16571
- import("./App-DHWSFME3.js")
16576
+ import("./App-ISTB45LE.js")
16572
16577
  ]);
16573
16578
  const baseUrl = await resolveBaseUrl(options, command);
16574
16579
  assertSecureBaseUrl(baseUrl);
@@ -16623,10 +16628,10 @@ program.command("chat").description("Start an interactive chat session").option(
16623
16628
  "Access key for automation",
16624
16629
  process.env.CLOUDEVAL_ACCESS_KEY
16625
16630
  ).option("--access-key-stdin", "Read access key from stdin (recommended for automation)", false).option("--conversation <id>", "Conversation/thread id to resume").option("--continue", "Resume the most recent local chat session", false).option("--resume <id-or-title>", "Resume a local chat session by thread id or title").option("--model <name>", "Model name").option("--mode <mode>", "Initial chat mode: ask, agent").option("--debug", "Log raw chunks", false).option("--health-check", "Enable health check (disabled by default)").option("--no-banner", "Disable ASCII banner").option("--animate", "Enable TUI animations (default)").option("--no-anim", "Disable TUI animations").option("-v, --verbose", "Enable verbose logging", false).action(async (options, command) => {
16626
- const { assertSecureBaseUrl } = await import("./dist-V2L4CPTU.js");
16631
+ const { assertSecureBaseUrl } = await import("./dist-QYIPN7MD.js");
16627
16632
  const [{ render }, { App }] = await Promise.all([
16628
16633
  import("ink"),
16629
- import("./App-DHWSFME3.js")
16634
+ import("./App-ISTB45LE.js")
16630
16635
  ]);
16631
16636
  const baseUrl = await resolveBaseUrl(options, command);
16632
16637
  assertSecureBaseUrl(baseUrl);
@@ -16701,7 +16706,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
16701
16706
  const question = Array.isArray(questionParts) ? questionParts.join(" ") : String(questionParts);
16702
16707
  const commandName = command.parent?.args?.[0] === "agent" ? "agent" : "ask";
16703
16708
  const selectedMode = commandName === "agent" ? "agent" : "ask";
16704
- const { assertSecureBaseUrl } = await import("./dist-V2L4CPTU.js");
16709
+ const { assertSecureBaseUrl } = await import("./dist-QYIPN7MD.js");
16705
16710
  const baseUrl = await resolveBaseUrl(options, command);
16706
16711
  assertSecureBaseUrl(baseUrl);
16707
16712
  const selectedProfile = getActiveConfigProfile(command);
@@ -16742,7 +16747,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
16742
16747
  const fs14 = await import("fs");
16743
16748
  const fsPromises = await import("fs/promises");
16744
16749
  const { randomUUID: randomUUID5 } = await import("crypto");
16745
- const core = await import("./dist-V2L4CPTU.js");
16750
+ const core = await import("./dist-QYIPN7MD.js");
16746
16751
  const {
16747
16752
  streamChat,
16748
16753
  reduceChunk,
@@ -16798,7 +16803,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
16798
16803
  console.error("Authentication required. Starting login process...\n");
16799
16804
  }
16800
16805
  try {
16801
- const { login } = await import("./dist-V2L4CPTU.js");
16806
+ const { login } = await import("./dist-QYIPN7MD.js");
16802
16807
  verboseLog("Calling interactive login", { baseUrl });
16803
16808
  token = await login(baseUrl, {
16804
16809
  headless: isHeadlessEnvironment()
@@ -16862,7 +16867,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
16862
16867
  message: error.message
16863
16868
  });
16864
16869
  }
16865
- const { resolveAskProject } = await import("./resolveAskProject-FUNKDV4V.js");
16870
+ const { resolveAskProject } = await import("./resolveAskProject-CL25APSQ.js");
16866
16871
  let project;
16867
16872
  try {
16868
16873
  project = await resolveAskProject({
@@ -17380,7 +17385,7 @@ Error: ${errorMsg}
17380
17385
  program.command("banner").description("Preview the startup banner and terminal capabilities").action(async () => {
17381
17386
  const { render } = await import("ink");
17382
17387
  const BannerPreview = React.lazy(async () => ({
17383
- default: (await import("./Banner-774ZEOGC.js")).Banner
17388
+ default: (await import("./Banner-USFUJC3Y.js")).Banner
17384
17389
  }));
17385
17390
  render(
17386
17391
  /* @__PURE__ */ jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(BannerPreview, { disable: false }) })
@@ -79,7 +79,7 @@ import {
79
79
  runReports,
80
80
  setActiveCLITraceContext,
81
81
  streamChat
82
- } from "./chunk-Z3REBOP5.js";
82
+ } from "./chunk-ERGQHMNT.js";
83
83
  export {
84
84
  AgentProfileRequestError,
85
85
  BUNDLED_AGENT_PROFILES,
@@ -1,6 +1,6 @@
1
1
  // src/resolveAskProject.ts
2
2
  var resolveAskProject = async (input) => {
3
- const core = await import("./dist-V2L4CPTU.js");
3
+ const core = await import("./dist-QYIPN7MD.js");
4
4
  const { getProjects, ensurePlaygroundProject, checkUserStatus } = core;
5
5
  let userId = input.authenticatedUserId;
6
6
  let user = input.authenticatedUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganakailabs/cloudeval-cli",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
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.29.0",
17
+ "versionInfo": "0.29.2",
18
18
  "downloadLocation": "https://github.com/ganakailabs/cloudeval-cli",
19
19
  "filesAnalyzed": false,
20
20
  "licenseConcluded": "LicenseRef-CloudEval-CLI",