@ganakailabs/cloudeval-cli 0.29.0 → 0.29.1
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/{App-DHWSFME3.js → App-OLD5LMTA.js} +6 -6
- package/dist/{Banner-774ZEOGC.js → Banner-6W7U2C44.js} +2 -2
- package/dist/{Onboarding-AFBWD2CE.js → Onboarding-HCORVZMZ.js} +2 -2
- package/dist/{chunk-DHSRVVGH.js → chunk-4OE4CRKD.js} +1 -1
- package/dist/{chunk-SLZ2XYAT.js → chunk-AO4LJZTG.js} +1 -1
- package/dist/{chunk-Z3REBOP5.js → chunk-ERGQHMNT.js} +16 -0
- package/dist/{chunk-ILKR22AS.js → chunk-VRLH2WYY.js} +1 -1
- package/dist/cli.js +61 -61
- package/dist/{dist-V2L4CPTU.js → dist-QYIPN7MD.js} +1 -1
- package/dist/{resolveAskProject-FUNKDV4V.js → resolveAskProject-CL25APSQ.js} +1 -1
- package/package.json +1 -1
- package/sbom.spdx.json +1 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-CS4NE336.js";
|
|
9
9
|
import {
|
|
10
10
|
Onboarding
|
|
11
|
-
} from "./chunk-
|
|
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-
|
|
38
|
+
} from "./chunk-ERGQHMNT.js";
|
|
39
39
|
import {
|
|
40
40
|
Banner
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-VRLH2WYY.js";
|
|
42
42
|
import {
|
|
43
43
|
CLI_VERSION
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-AO4LJZTG.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-
|
|
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-
|
|
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
|
});
|
|
@@ -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
|
}
|
package/dist/cli.js
CHANGED
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
redactSensitiveSecrets,
|
|
37
37
|
redactSensitiveText,
|
|
38
38
|
setActiveCLITraceContext
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ERGQHMNT.js";
|
|
40
40
|
import {
|
|
41
41
|
CLI_VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-AO4LJZTG.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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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,
|
|
@@ -5244,7 +5244,7 @@ var runChatRecipe = async (recipe, prompt2, options, command, deps) => {
|
|
|
5244
5244
|
});
|
|
5245
5245
|
progressWriter.write({ type: "auth", step: "auth", message: "Resolving authentication" });
|
|
5246
5246
|
const context = await resolveAuthContext(options, command, deps);
|
|
5247
|
-
const core = await import("./dist-
|
|
5247
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
5248
5248
|
progressWriter.write({
|
|
5249
5249
|
type: "request",
|
|
5250
5250
|
step: "project",
|
|
@@ -6808,7 +6808,7 @@ var configureDiagramExportCommand = (command, deps) => addAuthOptions(command, d
|
|
|
6808
6808
|
const context = requireAuthUser(
|
|
6809
6809
|
await resolveAuthContext(options, actionCommand, deps)
|
|
6810
6810
|
);
|
|
6811
|
-
const core = await import("./dist-
|
|
6811
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
6812
6812
|
const projects = await core.getProjects(
|
|
6813
6813
|
context.baseUrl,
|
|
6814
6814
|
context.token,
|
|
@@ -6885,7 +6885,7 @@ var registerProjectsCommand = (program2, deps) => {
|
|
|
6885
6885
|
addCommon(addAuthOptions(projects.command("list").description("List projects"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
6886
6886
|
try {
|
|
6887
6887
|
const context = await resolveAuthContext(options, command, deps);
|
|
6888
|
-
const core = await import("./dist-
|
|
6888
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
6889
6889
|
const data = await listProjectsForContext(core, context);
|
|
6890
6890
|
const url = buildFrontendUrl({ baseUrl: frontendBase(context, options), target: "projects" });
|
|
6891
6891
|
await writeProjectListOutput({ data, options, frontendUrl: url });
|
|
@@ -6903,7 +6903,7 @@ var registerProjectsCommand = (program2, deps) => {
|
|
|
6903
6903
|
).action(async (id, options, command) => {
|
|
6904
6904
|
try {
|
|
6905
6905
|
const context = await resolveAuthContext(options, command, deps);
|
|
6906
|
-
const core = await import("./dist-
|
|
6906
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
6907
6907
|
const list = await listProjectsForContext(core, context);
|
|
6908
6908
|
const data = list.find((project) => project.id === id);
|
|
6909
6909
|
if (!data) {
|
|
@@ -6972,7 +6972,7 @@ var registerProjectsCommand = (program2, deps) => {
|
|
|
6972
6972
|
try {
|
|
6973
6973
|
assertSingleProjectSource(options);
|
|
6974
6974
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6975
|
-
const core = await import("./dist-
|
|
6975
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
6976
6976
|
const template = await fileBlob(options.templateFile);
|
|
6977
6977
|
const parameters = await fileBlob(options.parametersFile);
|
|
6978
6978
|
const workspace = options.workspaceDir ? await collectWorkspaceFiles(options.workspaceDir, options) : void 0;
|
|
@@ -7097,7 +7097,7 @@ var registerIssuesInventoryCommand = (program2, deps) => {
|
|
|
7097
7097
|
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
7098
|
try {
|
|
7099
7099
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7100
|
-
const core = await import("./dist-
|
|
7100
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7101
7101
|
const data = await core.listIssuesItems({
|
|
7102
7102
|
baseUrl: context.baseUrl,
|
|
7103
7103
|
authToken: context.token,
|
|
@@ -7145,7 +7145,7 @@ var registerIssuesInventoryCommand = (program2, deps) => {
|
|
|
7145
7145
|
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
7146
|
try {
|
|
7147
7147
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7148
|
-
const core = await import("./dist-
|
|
7148
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7149
7149
|
const data = await core.getIssuesItem({
|
|
7150
7150
|
baseUrl: context.baseUrl,
|
|
7151
7151
|
authToken: context.token,
|
|
@@ -7266,7 +7266,7 @@ var registerConnectionsCommand = (program2, deps) => {
|
|
|
7266
7266
|
addCommon3(addAuthOptions(connections.command("list").description("List connections"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
7267
7267
|
try {
|
|
7268
7268
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7269
|
-
const core = await import("./dist-
|
|
7269
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7270
7270
|
const data = await core.listConnections({
|
|
7271
7271
|
baseUrl: context.baseUrl,
|
|
7272
7272
|
authToken: context.token,
|
|
@@ -7291,7 +7291,7 @@ var registerConnectionsCommand = (program2, deps) => {
|
|
|
7291
7291
|
).action(async (id, options, command) => {
|
|
7292
7292
|
try {
|
|
7293
7293
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7294
|
-
const core = await import("./dist-
|
|
7294
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7295
7295
|
const data = await core.getConnection({
|
|
7296
7296
|
baseUrl: context.baseUrl,
|
|
7297
7297
|
authToken: context.token,
|
|
@@ -7628,7 +7628,7 @@ var checkoutReturnUrl = (context, options) => options.returnTo || billingUrl(con
|
|
|
7628
7628
|
var runTopUpCheckout = async (commandName, packId, options, command, deps) => {
|
|
7629
7629
|
try {
|
|
7630
7630
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7631
|
-
const core = await import("./dist-
|
|
7631
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7632
7632
|
const returnTo = checkoutReturnUrl(context, options);
|
|
7633
7633
|
const session = await core.createTopUpCheckoutSession({
|
|
7634
7634
|
baseUrl: context.baseUrl,
|
|
@@ -7668,7 +7668,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
7668
7668
|
).action(async (options, command) => {
|
|
7669
7669
|
try {
|
|
7670
7670
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7671
|
-
const core = await import("./dist-
|
|
7671
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7672
7672
|
const range = rangeToDates("30d");
|
|
7673
7673
|
const [entitlement, usageSummary] = await Promise.all([
|
|
7674
7674
|
core.getBillingEntitlement({
|
|
@@ -7698,7 +7698,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
7698
7698
|
addCommon4(addAuthOptions(billing.command("summary").description("Show billing summary"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
7699
7699
|
try {
|
|
7700
7700
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7701
|
-
const core = await import("./dist-
|
|
7701
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7702
7702
|
const range = rangeToDates("30d");
|
|
7703
7703
|
const [entitlement, subscriptionStatus, usageSummary] = await Promise.all([
|
|
7704
7704
|
core.getBillingEntitlement({ baseUrl: context.baseUrl, authToken: context.token }),
|
|
@@ -7734,7 +7734,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
7734
7734
|
addCommon4(addAuthOptions(billing.command("plans").description("Show billing plans"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
7735
7735
|
try {
|
|
7736
7736
|
const context = await resolveAuthContext(options, command, deps);
|
|
7737
|
-
const core = await import("./dist-
|
|
7737
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7738
7738
|
const data = await core.getBillingConfig({ baseUrl: context.baseUrl, authToken: context.token });
|
|
7739
7739
|
const url = billingUrl(context, { ...options, tab: "plans" });
|
|
7740
7740
|
await write("billing plans", data, options, url);
|
|
@@ -7746,7 +7746,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
7746
7746
|
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
7747
|
try {
|
|
7748
7748
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7749
|
-
const core = await import("./dist-
|
|
7749
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7750
7750
|
const range = rangeToDates(options.range);
|
|
7751
7751
|
const data = await core.getBillingUsageSummary({
|
|
7752
7752
|
baseUrl: context.baseUrl,
|
|
@@ -7769,7 +7769,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
7769
7769
|
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
7770
|
try {
|
|
7771
7771
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7772
|
-
const core = await import("./dist-
|
|
7772
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7773
7773
|
const range = rangeToDates(options.range);
|
|
7774
7774
|
const data = await core.getBillingUsageLedger({
|
|
7775
7775
|
baseUrl: context.baseUrl,
|
|
@@ -7797,7 +7797,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
7797
7797
|
addCommon4(addAuthOptions(billing.command(name).description(`Show billing ${name}`), deps.defaultBaseUrl)).option("--limit <n>", "Result limit", "25").action(async (options, command) => {
|
|
7798
7798
|
try {
|
|
7799
7799
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7800
|
-
const core = await import("./dist-
|
|
7800
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7801
7801
|
const data = await core[getter]({
|
|
7802
7802
|
baseUrl: context.baseUrl,
|
|
7803
7803
|
authToken: context.token,
|
|
@@ -7815,7 +7815,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
7815
7815
|
addCommon4(addAuthOptions(topups, deps.defaultBaseUrl)).option("--limit <n>", "Result limit", "25").action(async (options, command) => {
|
|
7816
7816
|
try {
|
|
7817
7817
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
7818
|
-
const core = await import("./dist-
|
|
7818
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
7819
7819
|
const data = await core.getTopUpPacks({
|
|
7820
7820
|
baseUrl: context.baseUrl,
|
|
7821
7821
|
authToken: context.token
|
|
@@ -10870,7 +10870,7 @@ var reportsFrontendUrl = (config, input) => buildFrontendUrl({
|
|
|
10870
10870
|
reportVerbosity: input.reportVerbosity
|
|
10871
10871
|
});
|
|
10872
10872
|
var resolveAuth = async (config, options = {}) => {
|
|
10873
|
-
const core = await import("./dist-
|
|
10873
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
10874
10874
|
core.assertSecureBaseUrl(config.baseUrl);
|
|
10875
10875
|
let token;
|
|
10876
10876
|
try {
|
|
@@ -10966,7 +10966,7 @@ var assertModelAvailable = async (config, token) => {
|
|
|
10966
10966
|
if (!config.model) {
|
|
10967
10967
|
return;
|
|
10968
10968
|
}
|
|
10969
|
-
const core = await import("./dist-
|
|
10969
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
10970
10970
|
try {
|
|
10971
10971
|
const response = await fetch(
|
|
10972
10972
|
`${core.normalizeApiBase(config.baseUrl)}/models`,
|
|
@@ -11223,7 +11223,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
11223
11223
|
});
|
|
11224
11224
|
handlers.set("agent_profiles_list", async (args) => {
|
|
11225
11225
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
11226
|
-
const core = await import("./dist-
|
|
11226
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
11227
11227
|
const data = await listProfilesForDiscovery(core, config.baseUrl);
|
|
11228
11228
|
return withEnvelope({
|
|
11229
11229
|
command: "agents list",
|
|
@@ -11236,7 +11236,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
11236
11236
|
throw new Error("profileId is required.");
|
|
11237
11237
|
}
|
|
11238
11238
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
11239
|
-
const core = await import("./dist-
|
|
11239
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
11240
11240
|
const data = await getProfileForDiscovery(core, config.baseUrl, profileId);
|
|
11241
11241
|
return withEnvelope({
|
|
11242
11242
|
command: "agents show",
|
|
@@ -11882,7 +11882,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
11882
11882
|
});
|
|
11883
11883
|
handlers.set("auth_status", async (args) => {
|
|
11884
11884
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
11885
|
-
const core = await import("./dist-
|
|
11885
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
11886
11886
|
const data = await core.getAuthStatus(config.baseUrl, { validate: true });
|
|
11887
11887
|
return withEnvelope({
|
|
11888
11888
|
command: "auth status",
|
|
@@ -11891,7 +11891,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
11891
11891
|
});
|
|
11892
11892
|
handlers.set("status", async (args) => {
|
|
11893
11893
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
11894
|
-
const core = await import("./dist-
|
|
11894
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
11895
11895
|
const auth = await core.getAuthStatus(config.baseUrl, { validate: true });
|
|
11896
11896
|
return withEnvelope({
|
|
11897
11897
|
command: "status",
|
|
@@ -11922,7 +11922,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
11922
11922
|
}
|
|
11923
11923
|
];
|
|
11924
11924
|
try {
|
|
11925
|
-
const core = await import("./dist-
|
|
11925
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
11926
11926
|
core.assertSecureBaseUrl(config.baseUrl);
|
|
11927
11927
|
checks.push({
|
|
11928
11928
|
id: "base-url-secure",
|
|
@@ -12442,7 +12442,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
12442
12442
|
} catch {
|
|
12443
12443
|
token = config.accessKey;
|
|
12444
12444
|
}
|
|
12445
|
-
const core = await import("./dist-
|
|
12445
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
12446
12446
|
const data = await core.getBillingConfig({
|
|
12447
12447
|
baseUrl: config.baseUrl,
|
|
12448
12448
|
authToken: token
|
|
@@ -13338,7 +13338,7 @@ var registerCapabilitiesCommand = (program2, deps) => {
|
|
|
13338
13338
|
warnIfAccessKeyFromCliOption(options, command);
|
|
13339
13339
|
let data = capabilities;
|
|
13340
13340
|
if (options.live) {
|
|
13341
|
-
const core = await import("./dist-
|
|
13341
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
13342
13342
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
13343
13343
|
const accessKey = options.accessKeyStdin ? await deps.readStdinValue() : options.accessKey;
|
|
13344
13344
|
const token = await core.getAuthToken({ accessKey, baseUrl });
|
|
@@ -13476,7 +13476,7 @@ var writeCredentialOutput = async (input) => {
|
|
|
13476
13476
|
};
|
|
13477
13477
|
var resolveCoreAuth = async (options, command, deps) => {
|
|
13478
13478
|
const context = await resolveAuthContext(options, command, deps);
|
|
13479
|
-
const core = await import("./dist-
|
|
13479
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
13480
13480
|
return { ...context, core };
|
|
13481
13481
|
};
|
|
13482
13482
|
var parseCapabilities = (value) => value?.split(",").map((item) => item.trim()).filter(Boolean);
|
|
@@ -13809,7 +13809,7 @@ var registerAgentsCommand = (program2, deps) => {
|
|
|
13809
13809
|
const agents = program2.command("agents").description("CloudEval Agent Profile utilities");
|
|
13810
13810
|
addAgentOutputOptions(agents.command("list").description("List Agent Profiles"), deps).action(async (options, command) => {
|
|
13811
13811
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
13812
|
-
const core = await import("./dist-
|
|
13812
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
13813
13813
|
core.assertSecureBaseUrl(baseUrl);
|
|
13814
13814
|
const data = await listProfilesForDiscovery2(core, baseUrl);
|
|
13815
13815
|
await writeProfiles({
|
|
@@ -13825,7 +13825,7 @@ var registerAgentsCommand = (program2, deps) => {
|
|
|
13825
13825
|
deps
|
|
13826
13826
|
).action(async (profileId, options, command) => {
|
|
13827
13827
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
13828
|
-
const core = await import("./dist-
|
|
13828
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
13829
13829
|
core.assertSecureBaseUrl(baseUrl);
|
|
13830
13830
|
const data = await getProfileForDiscovery2(core, baseUrl, profileId);
|
|
13831
13831
|
await writeProfiles({
|
|
@@ -13844,7 +13844,7 @@ var registerAgentsCommand = (program2, deps) => {
|
|
|
13844
13844
|
const cliProfile = getActiveConfigProfile(command);
|
|
13845
13845
|
const cliConfig = await loadCliConfig(cliProfile);
|
|
13846
13846
|
const auth = await resolveAuthContext(options, command, deps);
|
|
13847
|
-
const core = await import("./dist-
|
|
13847
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
13848
13848
|
const profileResponse = await core.getAgentProfile({
|
|
13849
13849
|
baseUrl: auth.baseUrl,
|
|
13850
13850
|
authToken: auth.token,
|
|
@@ -14406,7 +14406,7 @@ var registerDiagnosticsCommands = (program2, deps) => {
|
|
|
14406
14406
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
14407
14407
|
const profile = getActiveConfigProfile(command);
|
|
14408
14408
|
const config = await loadCliConfig(profile);
|
|
14409
|
-
const core = await import("./dist-
|
|
14409
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
14410
14410
|
const auth = await core.getAuthStatus(baseUrl, { validate: true });
|
|
14411
14411
|
if (options.format === "text" || !options.format) {
|
|
14412
14412
|
process.stdout.write(
|
|
@@ -14456,7 +14456,7 @@ var registerDiagnosticsCommands = (program2, deps) => {
|
|
|
14456
14456
|
detail: getCliConfigPath(profile)
|
|
14457
14457
|
});
|
|
14458
14458
|
try {
|
|
14459
|
-
const core = await import("./dist-
|
|
14459
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
14460
14460
|
core.assertSecureBaseUrl(baseUrl);
|
|
14461
14461
|
checks.push({
|
|
14462
14462
|
id: "base-url-secure",
|
|
@@ -14556,7 +14556,7 @@ var resolveToken2 = async (options, deps, baseUrl, command) => {
|
|
|
14556
14556
|
return options.accessKey;
|
|
14557
14557
|
}
|
|
14558
14558
|
try {
|
|
14559
|
-
const core = await import("./dist-
|
|
14559
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
14560
14560
|
return await core.getAuthToken({
|
|
14561
14561
|
baseUrl
|
|
14562
14562
|
});
|
|
@@ -14640,7 +14640,7 @@ var registerModelsCommand = (program2, deps) => {
|
|
|
14640
14640
|
let source = "fallback";
|
|
14641
14641
|
let modelList = fallbackModels;
|
|
14642
14642
|
try {
|
|
14643
|
-
const core = await import("./dist-
|
|
14643
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
14644
14644
|
const response = await fetch(`${core.normalizeApiBase(baseUrl)}/models`, {
|
|
14645
14645
|
headers: {
|
|
14646
14646
|
Accept: "application/json",
|
|
@@ -15819,7 +15819,7 @@ var uninstallCompletionScript = async (shell) => {
|
|
|
15819
15819
|
var runInteractiveLoginOnboarding = async (baseUrl, token) => {
|
|
15820
15820
|
const [{ render }, { Onboarding }] = await Promise.all([
|
|
15821
15821
|
import("ink"),
|
|
15822
|
-
import("./Onboarding-
|
|
15822
|
+
import("./Onboarding-HCORVZMZ.js")
|
|
15823
15823
|
]);
|
|
15824
15824
|
await new Promise((resolve) => {
|
|
15825
15825
|
let app;
|
|
@@ -16153,7 +16153,7 @@ var resolveBaseUrl = async (options, command) => {
|
|
|
16153
16153
|
});
|
|
16154
16154
|
}
|
|
16155
16155
|
try {
|
|
16156
|
-
const { getAuthStatus } = await import("./dist-
|
|
16156
|
+
const { getAuthStatus } = await import("./dist-QYIPN7MD.js");
|
|
16157
16157
|
const status = await getAuthStatus();
|
|
16158
16158
|
const storedBaseUrl = status.baseUrl;
|
|
16159
16159
|
if (storedBaseUrl && shouldUseStoredBaseUrl(storedBaseUrl)) {
|
|
@@ -16227,7 +16227,7 @@ program.command("login").description("Authenticate with Cloudeval").option(
|
|
|
16227
16227
|
checkUserStatus,
|
|
16228
16228
|
ensurePlaygroundProject,
|
|
16229
16229
|
login
|
|
16230
|
-
} = await import("./dist-
|
|
16230
|
+
} = await import("./dist-QYIPN7MD.js");
|
|
16231
16231
|
assertSecureBaseUrl(options.baseUrl);
|
|
16232
16232
|
const headlessEnvironment = isHeadlessEnvironment();
|
|
16233
16233
|
const headlessLogin = options.headless || headlessEnvironment;
|
|
@@ -16302,7 +16302,7 @@ program.command("logout").description("Log out and clear stored authentication s
|
|
|
16302
16302
|
DEFAULT_BASE_URL
|
|
16303
16303
|
).option("--all-devices", "Revoke sessions on all devices", false).action(async (options) => {
|
|
16304
16304
|
try {
|
|
16305
|
-
const { assertSecureBaseUrl, logout } = await import("./dist-
|
|
16305
|
+
const { assertSecureBaseUrl, logout } = await import("./dist-QYIPN7MD.js");
|
|
16306
16306
|
assertSecureBaseUrl(options.baseUrl);
|
|
16307
16307
|
const result = await logout({
|
|
16308
16308
|
baseUrl: options.baseUrl,
|
|
@@ -16336,7 +16336,7 @@ authCommand.command("status").description("Show current authentication status").
|
|
|
16336
16336
|
DEFAULT_BASE_URL
|
|
16337
16337
|
).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
16338
|
try {
|
|
16339
|
-
const { assertSecureBaseUrl, getAuthStatus } = await import("./dist-
|
|
16339
|
+
const { assertSecureBaseUrl, getAuthStatus } = await import("./dist-QYIPN7MD.js");
|
|
16340
16340
|
const effectiveBaseUrl = await resolveBaseUrl(options, command);
|
|
16341
16341
|
assertSecureBaseUrl(effectiveBaseUrl);
|
|
16342
16342
|
const status = await getAuthStatus(effectiveBaseUrl, { validate: true });
|
|
@@ -16565,10 +16565,10 @@ program.command("tui").description("Open the CloudEval Terminal UI").option(
|
|
|
16565
16565
|
"Access key for automation",
|
|
16566
16566
|
process.env.CLOUDEVAL_ACCESS_KEY
|
|
16567
16567
|
).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-
|
|
16568
|
+
const { assertSecureBaseUrl } = await import("./dist-QYIPN7MD.js");
|
|
16569
16569
|
const [{ render }, { App }] = await Promise.all([
|
|
16570
16570
|
import("ink"),
|
|
16571
|
-
import("./App-
|
|
16571
|
+
import("./App-OLD5LMTA.js")
|
|
16572
16572
|
]);
|
|
16573
16573
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
16574
16574
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -16623,10 +16623,10 @@ program.command("chat").description("Start an interactive chat session").option(
|
|
|
16623
16623
|
"Access key for automation",
|
|
16624
16624
|
process.env.CLOUDEVAL_ACCESS_KEY
|
|
16625
16625
|
).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-
|
|
16626
|
+
const { assertSecureBaseUrl } = await import("./dist-QYIPN7MD.js");
|
|
16627
16627
|
const [{ render }, { App }] = await Promise.all([
|
|
16628
16628
|
import("ink"),
|
|
16629
|
-
import("./App-
|
|
16629
|
+
import("./App-OLD5LMTA.js")
|
|
16630
16630
|
]);
|
|
16631
16631
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
16632
16632
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -16701,7 +16701,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
16701
16701
|
const question = Array.isArray(questionParts) ? questionParts.join(" ") : String(questionParts);
|
|
16702
16702
|
const commandName = command.parent?.args?.[0] === "agent" ? "agent" : "ask";
|
|
16703
16703
|
const selectedMode = commandName === "agent" ? "agent" : "ask";
|
|
16704
|
-
const { assertSecureBaseUrl } = await import("./dist-
|
|
16704
|
+
const { assertSecureBaseUrl } = await import("./dist-QYIPN7MD.js");
|
|
16705
16705
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
16706
16706
|
assertSecureBaseUrl(baseUrl);
|
|
16707
16707
|
const selectedProfile = getActiveConfigProfile(command);
|
|
@@ -16742,7 +16742,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
16742
16742
|
const fs14 = await import("fs");
|
|
16743
16743
|
const fsPromises = await import("fs/promises");
|
|
16744
16744
|
const { randomUUID: randomUUID5 } = await import("crypto");
|
|
16745
|
-
const core = await import("./dist-
|
|
16745
|
+
const core = await import("./dist-QYIPN7MD.js");
|
|
16746
16746
|
const {
|
|
16747
16747
|
streamChat,
|
|
16748
16748
|
reduceChunk,
|
|
@@ -16798,7 +16798,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
16798
16798
|
console.error("Authentication required. Starting login process...\n");
|
|
16799
16799
|
}
|
|
16800
16800
|
try {
|
|
16801
|
-
const { login } = await import("./dist-
|
|
16801
|
+
const { login } = await import("./dist-QYIPN7MD.js");
|
|
16802
16802
|
verboseLog("Calling interactive login", { baseUrl });
|
|
16803
16803
|
token = await login(baseUrl, {
|
|
16804
16804
|
headless: isHeadlessEnvironment()
|
|
@@ -16862,7 +16862,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
16862
16862
|
message: error.message
|
|
16863
16863
|
});
|
|
16864
16864
|
}
|
|
16865
|
-
const { resolveAskProject } = await import("./resolveAskProject-
|
|
16865
|
+
const { resolveAskProject } = await import("./resolveAskProject-CL25APSQ.js");
|
|
16866
16866
|
let project;
|
|
16867
16867
|
try {
|
|
16868
16868
|
project = await resolveAskProject({
|
|
@@ -17380,7 +17380,7 @@ Error: ${errorMsg}
|
|
|
17380
17380
|
program.command("banner").description("Preview the startup banner and terminal capabilities").action(async () => {
|
|
17381
17381
|
const { render } = await import("ink");
|
|
17382
17382
|
const BannerPreview = React.lazy(async () => ({
|
|
17383
|
-
default: (await import("./Banner-
|
|
17383
|
+
default: (await import("./Banner-6W7U2C44.js")).Banner
|
|
17384
17384
|
}));
|
|
17385
17385
|
render(
|
|
17386
17386
|
/* @__PURE__ */ jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(BannerPreview, { disable: false }) })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/resolveAskProject.ts
|
|
2
2
|
var resolveAskProject = async (input) => {
|
|
3
|
-
const core = await import("./dist-
|
|
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
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.
|
|
17
|
+
"versionInfo": "0.29.1",
|
|
18
18
|
"downloadLocation": "https://github.com/ganakailabs/cloudeval-cli",
|
|
19
19
|
"filesAnalyzed": false,
|
|
20
20
|
"licenseConcluded": "LicenseRef-CloudEval-CLI",
|