@ganakailabs/cloudeval-cli 0.26.1 → 0.26.3
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-3VDZ4SKF.js → App-74TOEWUN.js} +6 -6
- package/dist/{Banner-7BP5U7P4.js → Banner-JWHQ4HG5.js} +2 -2
- package/dist/{Onboarding-QV5RTUCR.js → Onboarding-SAYMQ36N.js} +2 -2
- package/dist/{chunk-KBHRBGSX.js → chunk-3MIP274G.js} +5 -1
- package/dist/{chunk-UUXJKGRN.js → chunk-5NOPTAZO.js} +1 -1
- package/dist/{chunk-M5XGS3ZV.js → chunk-DALUYBCW.js} +1 -1
- package/dist/{chunk-N4REL72M.js → chunk-XHA4BH3P.js} +1 -1
- package/dist/cli.js +179 -93
- package/dist/{dist-CFLR5FML.js → dist-QLN52XKY.js} +1 -1
- package/dist/{resolveAskProject-NK435I56.js → resolveAskProject-WOMNHUYT.js} +1 -1
- package/package.json +1 -1
- package/sbom.spdx.json +1 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-QSBGUI25.js";
|
|
9
9
|
import {
|
|
10
10
|
Onboarding
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XHA4BH3P.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-3MIP274G.js";
|
|
39
39
|
import {
|
|
40
40
|
Banner
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-DALUYBCW.js";
|
|
42
42
|
import {
|
|
43
43
|
CLI_VERSION
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-5NOPTAZO.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-QLN52XKY.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-QLN52XKY.js");
|
|
7354
7354
|
const newToken = await login(baseUrl, {
|
|
7355
7355
|
headless: Boolean(process.env.SSH_TTY || process.env.CI)
|
|
7356
7356
|
});
|
|
@@ -1998,7 +1998,11 @@ async function* streamChat(options) {
|
|
|
1998
1998
|
assertSecureBaseUrl2(options.baseUrl);
|
|
1999
1999
|
const payload = buildPayload(options);
|
|
2000
2000
|
const apiBase = normalizeApiBase(options.baseUrl);
|
|
2001
|
-
const
|
|
2001
|
+
const streamUrl = new URL(`${apiBase}/chat/stream`);
|
|
2002
|
+
if (options.project?.id) {
|
|
2003
|
+
streamUrl.searchParams.set("project_id", options.project.id);
|
|
2004
|
+
}
|
|
2005
|
+
const url = streamUrl.toString();
|
|
2002
2006
|
const streamIdleTimeoutMs = typeof options.streamIdleTimeoutMs === "number" && Number.isFinite(options.streamIdleTimeoutMs) && options.streamIdleTimeoutMs > 0 ? options.streamIdleTimeoutMs : void 0;
|
|
2003
2007
|
const headers = withIdempotencyHeader({
|
|
2004
2008
|
"Content-Type": "application/json",
|
package/dist/cli.js
CHANGED
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
normalizeApiBase,
|
|
34
34
|
redactSensitiveSecrets,
|
|
35
35
|
redactSensitiveText
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-3MIP274G.js";
|
|
37
37
|
import {
|
|
38
38
|
CLI_VERSION
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5NOPTAZO.js";
|
|
40
40
|
|
|
41
41
|
// src/runtime/prepareInk.ts
|
|
42
42
|
import fs from "fs";
|
|
@@ -1188,6 +1188,7 @@ var completeCliWords = (words) => {
|
|
|
1188
1188
|
};
|
|
1189
1189
|
|
|
1190
1190
|
// src/outputFormatter.ts
|
|
1191
|
+
import { once } from "events";
|
|
1191
1192
|
var showSensitiveIdsByDefault = false;
|
|
1192
1193
|
var SENSITIVE_IDENTIFIER_KEYS = /* @__PURE__ */ new Set([
|
|
1193
1194
|
"accountid",
|
|
@@ -1456,13 +1457,18 @@ ${JSON.stringify(data, null, 2)}
|
|
|
1456
1457
|
}
|
|
1457
1458
|
return formatTextRecord(data);
|
|
1458
1459
|
};
|
|
1460
|
+
var writeTextToStream = async (stream, text) => {
|
|
1461
|
+
if (!stream.write(text)) {
|
|
1462
|
+
await once(stream, "drain");
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1459
1465
|
var writeFormattedOutput = async (input) => {
|
|
1460
1466
|
const text = formatOutput(input);
|
|
1461
1467
|
if (input.output) {
|
|
1462
1468
|
await writePrivateOutputFile(input.output, text);
|
|
1463
1469
|
return;
|
|
1464
1470
|
}
|
|
1465
|
-
process.stdout
|
|
1471
|
+
await writeTextToStream(process.stdout, text);
|
|
1466
1472
|
};
|
|
1467
1473
|
var writePrivateOutputFile = async (output, text) => {
|
|
1468
1474
|
const fs14 = await import("fs/promises");
|
|
@@ -1643,7 +1649,7 @@ var resolveReportProjectId = async ({
|
|
|
1643
1649
|
if (!token) {
|
|
1644
1650
|
throw new Error("No project specified. Use --project <id> for report access.");
|
|
1645
1651
|
}
|
|
1646
|
-
const resolvedWorkspace = workspace ?? await import("./dist-
|
|
1652
|
+
const resolvedWorkspace = workspace ?? await import("./dist-QLN52XKY.js").then((core) => ({
|
|
1647
1653
|
checkUserStatus: core.checkUserStatus,
|
|
1648
1654
|
getProjects: core.getProjects
|
|
1649
1655
|
}));
|
|
@@ -1672,7 +1678,7 @@ var warnIfAccessKeyFromCliOption = (options, command) => {
|
|
|
1672
1678
|
};
|
|
1673
1679
|
var resolveAuthContext = async (options, command, deps) => {
|
|
1674
1680
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
1675
|
-
const core = await import("./dist-
|
|
1681
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
1676
1682
|
core.assertSecureBaseUrl(baseUrl);
|
|
1677
1683
|
warnIfAccessKeyFromCliOption(options, command);
|
|
1678
1684
|
let accessKey = options.accessKey;
|
|
@@ -1758,7 +1764,7 @@ var resolveToken = async (options, baseUrl, deps, command) => {
|
|
|
1758
1764
|
if (options.accessKey) {
|
|
1759
1765
|
return options.accessKey;
|
|
1760
1766
|
}
|
|
1761
|
-
const { getAuthToken } = await import("./dist-
|
|
1767
|
+
const { getAuthToken } = await import("./dist-QLN52XKY.js");
|
|
1762
1768
|
try {
|
|
1763
1769
|
return await getAuthToken({
|
|
1764
1770
|
accessKey: options.accessKey,
|
|
@@ -1769,7 +1775,7 @@ var resolveToken = async (options, baseUrl, deps, command) => {
|
|
|
1769
1775
|
if (!canLogin) {
|
|
1770
1776
|
throw error;
|
|
1771
1777
|
}
|
|
1772
|
-
const { login } = await import("./dist-
|
|
1778
|
+
const { login } = await import("./dist-QLN52XKY.js");
|
|
1773
1779
|
process.stderr.write("Authentication required. Starting login flow...\n");
|
|
1774
1780
|
const token = await login(baseUrl, {
|
|
1775
1781
|
headless: Boolean(process.env.SSH_TTY || process.env.CLOUDEVAL_HEADLESS_LOGIN)
|
|
@@ -1935,7 +1941,7 @@ var registerReportsCommand = (program2, deps) => {
|
|
|
1935
1941
|
token,
|
|
1936
1942
|
requestedProjectId: options.project
|
|
1937
1943
|
});
|
|
1938
|
-
const core = await import("./dist-
|
|
1944
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
1939
1945
|
const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
|
|
1940
1946
|
const reports2 = await core.listReports({
|
|
1941
1947
|
baseUrl,
|
|
@@ -1957,7 +1963,7 @@ var registerReportsCommand = (program2, deps) => {
|
|
|
1957
1963
|
try {
|
|
1958
1964
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
1959
1965
|
const token = await resolveToken(options, baseUrl, deps, command);
|
|
1960
|
-
const core = await import("./dist-
|
|
1966
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
1961
1967
|
const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
|
|
1962
1968
|
const projectId = await resolveReportProjectId({
|
|
1963
1969
|
baseUrl,
|
|
@@ -2060,7 +2066,7 @@ var registerReportsCommand = (program2, deps) => {
|
|
|
2060
2066
|
try {
|
|
2061
2067
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
2062
2068
|
const token = await resolveToken(options, baseUrl, deps, command);
|
|
2063
|
-
const core = await import("./dist-
|
|
2069
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
2064
2070
|
const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
|
|
2065
2071
|
const projectId = await resolveReportProjectId({
|
|
2066
2072
|
baseUrl,
|
|
@@ -2130,7 +2136,7 @@ var registerReportsCommand = (program2, deps) => {
|
|
|
2130
2136
|
token,
|
|
2131
2137
|
requestedProjectId: options.project
|
|
2132
2138
|
});
|
|
2133
|
-
const core = await import("./dist-
|
|
2139
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
2134
2140
|
const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
|
|
2135
2141
|
const report = await core.getWafReport({
|
|
2136
2142
|
baseUrl,
|
|
@@ -2169,7 +2175,7 @@ var registerReportsCommand = (program2, deps) => {
|
|
|
2169
2175
|
token,
|
|
2170
2176
|
requestedProjectId: options.project
|
|
2171
2177
|
});
|
|
2172
|
-
const core = await import("./dist-
|
|
2178
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
2173
2179
|
const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
|
|
2174
2180
|
const report = await core.getReport({
|
|
2175
2181
|
baseUrl,
|
|
@@ -2197,7 +2203,7 @@ var registerReportsCommand = (program2, deps) => {
|
|
|
2197
2203
|
token,
|
|
2198
2204
|
requestedProjectId: options.project
|
|
2199
2205
|
});
|
|
2200
|
-
const core = await import("./dist-
|
|
2206
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
2201
2207
|
const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
|
|
2202
2208
|
const report = await core.getCostReport({
|
|
2203
2209
|
baseUrl,
|
|
@@ -2226,7 +2232,7 @@ var registerReportsCommand = (program2, deps) => {
|
|
|
2226
2232
|
token,
|
|
2227
2233
|
requestedProjectId: options.project
|
|
2228
2234
|
});
|
|
2229
|
-
const core = await import("./dist-
|
|
2235
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
2230
2236
|
const status = token ? await core.checkUserStatus(baseUrl, token) : void 0;
|
|
2231
2237
|
const report = await core.getWafReport({
|
|
2232
2238
|
baseUrl,
|
|
@@ -2464,6 +2470,16 @@ var firstRecord = (...values) => {
|
|
|
2464
2470
|
}
|
|
2465
2471
|
return void 0;
|
|
2466
2472
|
};
|
|
2473
|
+
var entriesAsNamedRecords = (value, amountKey = "amount") => {
|
|
2474
|
+
const record = firstRecord(value);
|
|
2475
|
+
if (!record) {
|
|
2476
|
+
return [];
|
|
2477
|
+
}
|
|
2478
|
+
return Object.entries(record).map(([name, amount]) => ({
|
|
2479
|
+
name,
|
|
2480
|
+
[amountKey]: amount
|
|
2481
|
+
}));
|
|
2482
|
+
};
|
|
2467
2483
|
var extractPillars = (waf) => {
|
|
2468
2484
|
const fromArray = waf?.parsed?.score?.pillars;
|
|
2469
2485
|
if (Array.isArray(fromArray)) {
|
|
@@ -2483,9 +2499,11 @@ var extractPillars = (waf) => {
|
|
|
2483
2499
|
}).filter((pillar) => pillar !== void 0);
|
|
2484
2500
|
}
|
|
2485
2501
|
const scores = firstRecord(
|
|
2502
|
+
waf?.pillar_scores,
|
|
2486
2503
|
waf?.parsed?.pillar_scores,
|
|
2487
2504
|
waf?.parsed?.score?.pillar_scores,
|
|
2488
|
-
waf?.raw?.pillar_scores
|
|
2505
|
+
waf?.raw?.pillar_scores,
|
|
2506
|
+
waf?.report?.pillar_scores
|
|
2489
2507
|
);
|
|
2490
2508
|
if (!scores) return [];
|
|
2491
2509
|
return Object.entries(scores).map(([id, score]) => ({
|
|
@@ -2538,24 +2556,32 @@ var evaluateGate = ({
|
|
|
2538
2556
|
}) => {
|
|
2539
2557
|
const gateConfig = parseGateConfig(configText);
|
|
2540
2558
|
const overallScore = numberFrom(
|
|
2559
|
+
waf?.overall_score,
|
|
2560
|
+
waf?.report?.overall_score,
|
|
2541
2561
|
waf?.parsed?.score?.overall,
|
|
2542
2562
|
waf?.parsed?.overall_score,
|
|
2543
2563
|
waf?.raw?.score
|
|
2544
2564
|
);
|
|
2545
2565
|
const highRisk = numberFrom(
|
|
2566
|
+
waf?.critical_issues_count !== void 0 || waf?.high_issues_count !== void 0 ? (numberFrom(waf?.critical_issues_count) ?? 0) + (numberFrom(waf?.high_issues_count) ?? 0) : void 0,
|
|
2567
|
+
waf?.report?.critical_issues_count !== void 0 || waf?.report?.high_issues_count !== void 0 ? (numberFrom(waf?.report?.critical_issues_count) ?? 0) + (numberFrom(waf?.report?.high_issues_count) ?? 0) : void 0,
|
|
2546
2568
|
waf?.parsed?.counts?.highRisk,
|
|
2547
2569
|
waf?.parsed?.counts?.high_count,
|
|
2548
2570
|
waf?.parsed?.highRisk
|
|
2549
2571
|
);
|
|
2550
2572
|
const monthlyCost = numberFrom(
|
|
2573
|
+
cost?.report?.processed?.total_monthly_cost,
|
|
2574
|
+
cost?.report?.processed?.totalMonthlyCost,
|
|
2551
2575
|
cost?.parsed?.totalSpend?.amount,
|
|
2552
2576
|
cost?.parsed?.total_spend?.amount,
|
|
2553
2577
|
cost?.raw?.total
|
|
2554
2578
|
);
|
|
2555
2579
|
const currency = String(
|
|
2556
|
-
cost?.parsed?.totalSpend?.currency ?? cost?.parsed?.total_spend?.currency ?? cost?.raw?.currency ?? ""
|
|
2580
|
+
cost?.report?.metadata?.currency ?? cost?.parsed?.totalSpend?.currency ?? cost?.parsed?.total_spend?.currency ?? cost?.raw?.currency ?? ""
|
|
2557
2581
|
) || void 0;
|
|
2558
2582
|
const savings = numberFrom(
|
|
2583
|
+
cost?.report?.processed?.opportunity_summary?.total_monthly_savings,
|
|
2584
|
+
cost?.report?.processed?.opportunitySummary?.totalMonthlySavings,
|
|
2559
2585
|
cost?.parsed?.estimatedSavings?.amount,
|
|
2560
2586
|
cost?.parsed?.estimated_savings?.amount
|
|
2561
2587
|
);
|
|
@@ -2593,8 +2619,8 @@ var evaluateGate = ({
|
|
|
2593
2619
|
amount: savings,
|
|
2594
2620
|
currency
|
|
2595
2621
|
},
|
|
2596
|
-
topServices: Array.isArray(cost?.parsed?.serviceGroups) ? cost.parsed.serviceGroups.slice(0, 5)
|
|
2597
|
-
recommendations: Array.isArray(cost?.parsed?.recommendations) ? cost.parsed.recommendations.slice(0, 5)
|
|
2622
|
+
topServices: (Array.isArray(cost?.parsed?.serviceGroups) ? cost.parsed.serviceGroups : entriesAsNamedRecords(cost?.report?.processed?.cost_by_service_family)).slice(0, 5),
|
|
2623
|
+
recommendations: (Array.isArray(cost?.parsed?.recommendations) ? cost.parsed.recommendations : Array.isArray(cost?.report?.processed?.optimization_recommendations) ? cost.report.processed.optimization_recommendations : []).slice(0, 5)
|
|
2598
2624
|
};
|
|
2599
2625
|
if (!gateConfig) {
|
|
2600
2626
|
return {
|
|
@@ -2744,6 +2770,62 @@ var fetchProjectById = async ({
|
|
|
2744
2770
|
});
|
|
2745
2771
|
return projects?.map(asRecord).find((project) => project.id === projectId);
|
|
2746
2772
|
};
|
|
2773
|
+
var userScopedPath = (pathValue, userId) => {
|
|
2774
|
+
if (!userId) {
|
|
2775
|
+
return pathValue;
|
|
2776
|
+
}
|
|
2777
|
+
const [pathPart, queryPart = ""] = pathValue.split("?");
|
|
2778
|
+
const query = new URLSearchParams(queryPart);
|
|
2779
|
+
query.set("user_id", userId);
|
|
2780
|
+
const suffix = query.toString();
|
|
2781
|
+
return suffix ? `${pathPart}?${suffix}` : pathPart;
|
|
2782
|
+
};
|
|
2783
|
+
var sleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
2784
|
+
var fetchReviewReports = async ({
|
|
2785
|
+
baseUrl,
|
|
2786
|
+
token,
|
|
2787
|
+
projectId,
|
|
2788
|
+
userId
|
|
2789
|
+
}) => {
|
|
2790
|
+
const [cost, waf, preload] = await Promise.all([
|
|
2791
|
+
safeFetch({
|
|
2792
|
+
baseUrl,
|
|
2793
|
+
authToken: token,
|
|
2794
|
+
path: userScopedPath(`/cost-reports/${projectId}/full`, userId)
|
|
2795
|
+
}),
|
|
2796
|
+
safeFetch({
|
|
2797
|
+
baseUrl,
|
|
2798
|
+
authToken: token,
|
|
2799
|
+
path: userScopedPath(`/well-architected-reports/${projectId}/full`, userId)
|
|
2800
|
+
}),
|
|
2801
|
+
userId ? safeFetch({
|
|
2802
|
+
baseUrl,
|
|
2803
|
+
authToken: token,
|
|
2804
|
+
path: `/reports/preload/${encodeURIComponent(projectId)}?user_id=${encodeURIComponent(userId)}&include_payload=true`
|
|
2805
|
+
}) : Promise.resolve(void 0)
|
|
2806
|
+
]);
|
|
2807
|
+
return { cost, waf, preload };
|
|
2808
|
+
};
|
|
2809
|
+
var waitForReviewReports = async ({
|
|
2810
|
+
baseUrl,
|
|
2811
|
+
token,
|
|
2812
|
+
projectId,
|
|
2813
|
+
userId,
|
|
2814
|
+
wait,
|
|
2815
|
+
pollIntervalMs,
|
|
2816
|
+
waitTimeoutMs
|
|
2817
|
+
}) => {
|
|
2818
|
+
const startedAt = Date.now();
|
|
2819
|
+
let latest = await fetchReviewReports({ baseUrl, token, projectId, userId });
|
|
2820
|
+
while (wait && (!latest.cost || !latest.waf)) {
|
|
2821
|
+
if (Date.now() - startedAt > waitTimeoutMs) {
|
|
2822
|
+
return latest;
|
|
2823
|
+
}
|
|
2824
|
+
await sleep2(pollIntervalMs);
|
|
2825
|
+
latest = await fetchReviewReports({ baseUrl, token, projectId, userId });
|
|
2826
|
+
}
|
|
2827
|
+
return latest;
|
|
2828
|
+
};
|
|
2747
2829
|
var buildAiSummaryPrompt = (data) => [
|
|
2748
2830
|
"Write a concise CloudEval pull request review summary in Markdown.",
|
|
2749
2831
|
"Focus on gate status, Well-Architected posture, cost posture, and security/operational risks.",
|
|
@@ -2754,9 +2836,9 @@ var buildAiSummaryPrompt = (data) => [
|
|
|
2754
2836
|
`Ref: ${data.ref ?? "unknown"}`,
|
|
2755
2837
|
`Commit: ${data.commitSha ?? "unknown"}`,
|
|
2756
2838
|
`Gate: ${String(data.gate?.status ?? "unknown").toUpperCase()}`,
|
|
2757
|
-
`Well-Architected score: ${data.gate?.overallScore ?? "unknown"}`,
|
|
2758
|
-
`High-risk findings: ${data.gate?.highRisk ?? "unknown"}`,
|
|
2759
|
-
`Monthly cost: ${data.gate?.monthlyCost ?? "unknown"}`,
|
|
2839
|
+
`Well-Architected score: ${data.gate?.wellArchitected?.overall?.score ?? data.gate?.overallScore ?? "unknown"}`,
|
|
2840
|
+
`High-risk findings: ${data.gate?.wellArchitected?.risks?.high ?? data.gate?.highRisk ?? "unknown"}`,
|
|
2841
|
+
`Monthly cost: ${data.gate?.cost?.monthly?.amount ?? data.gate?.monthlyCost ?? "unknown"}`,
|
|
2760
2842
|
`Validation: PSRule failed ${data.gate?.validation?.psRule?.failed ?? "unknown"}, unit tests failed ${data.gate?.validation?.unitTests?.failed ?? "unknown"}`,
|
|
2761
2843
|
Array.isArray(data.gate?.failures) && data.gate.failures.length ? `Gate failures: ${data.gate.failures.join("; ")}` : "Gate failures: none reported"
|
|
2762
2844
|
].join("\n");
|
|
@@ -2770,7 +2852,7 @@ var generateAiSummary = async ({
|
|
|
2770
2852
|
agentProfileId,
|
|
2771
2853
|
data
|
|
2772
2854
|
}) => {
|
|
2773
|
-
const core = await import("./dist-
|
|
2855
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
2774
2856
|
const threadId = `review-${data.projectId}-${Date.now()}`;
|
|
2775
2857
|
let markdown = "";
|
|
2776
2858
|
for await (const chunk of core.streamChat({
|
|
@@ -2800,7 +2882,7 @@ var generateAiSummary = async ({
|
|
|
2800
2882
|
...mode === "agent" ? { agentProfileId: agentProfileId ?? "architecture" } : {},
|
|
2801
2883
|
completeAfterResponse: true,
|
|
2802
2884
|
responseCompletionGraceMs: 250,
|
|
2803
|
-
streamIdleTimeoutMs:
|
|
2885
|
+
streamIdleTimeoutMs: 12e4
|
|
2804
2886
|
})) {
|
|
2805
2887
|
const content = chunk?.content;
|
|
2806
2888
|
if (chunk.type === "responding" && typeof content === "string") {
|
|
@@ -2896,10 +2978,17 @@ var registerReviewCommand = (program2, deps) => {
|
|
|
2896
2978
|
body: commitSha ? { commit_sha: commitSha } : {},
|
|
2897
2979
|
idempotencyKey: `cloudeval-review-${projectId}-${commitSha ?? "head"}`
|
|
2898
2980
|
});
|
|
2981
|
+
const project = await fetchProjectById({
|
|
2982
|
+
baseUrl: context.baseUrl,
|
|
2983
|
+
token: context.token,
|
|
2984
|
+
projectId
|
|
2985
|
+
});
|
|
2986
|
+
const projectUserId = typeof project?.user_id === "string" && project.user_id.trim() ? project.user_id : void 0;
|
|
2987
|
+
const scopedUserId = context.user?.id ?? projectUserId;
|
|
2899
2988
|
const finalStatus = options.wait === false ? void 0 : extractJobId2(sync) ? await waitForJob({
|
|
2900
2989
|
baseUrl: context.baseUrl,
|
|
2901
2990
|
token: context.token,
|
|
2902
|
-
userId:
|
|
2991
|
+
userId: scopedUserId,
|
|
2903
2992
|
projectId,
|
|
2904
2993
|
jobId: extractJobId2(sync),
|
|
2905
2994
|
pollIntervalMs: parsePositiveInteger(
|
|
@@ -2913,29 +3002,26 @@ var registerReviewCommand = (program2, deps) => {
|
|
|
2913
3002
|
9e5
|
|
2914
3003
|
)
|
|
2915
3004
|
}) : void 0;
|
|
2916
|
-
const [cost, waf, configText] = await Promise.all([
|
|
2917
|
-
|
|
2918
|
-
baseUrl: context.baseUrl,
|
|
2919
|
-
authToken: context.token,
|
|
2920
|
-
path: `/cost-reports/${projectId}/full`
|
|
2921
|
-
}),
|
|
2922
|
-
safeFetch({
|
|
3005
|
+
const [{ cost, waf, preload }, configText] = await Promise.all([
|
|
3006
|
+
waitForReviewReports({
|
|
2923
3007
|
baseUrl: context.baseUrl,
|
|
2924
|
-
|
|
2925
|
-
|
|
3008
|
+
token: context.token,
|
|
3009
|
+
projectId,
|
|
3010
|
+
userId: scopedUserId,
|
|
3011
|
+
wait: options.wait !== false,
|
|
3012
|
+
pollIntervalMs: parsePositiveInteger(
|
|
3013
|
+
options.pollInterval,
|
|
3014
|
+
"--poll-interval",
|
|
3015
|
+
5e3
|
|
3016
|
+
),
|
|
3017
|
+
waitTimeoutMs: parsePositiveInteger(
|
|
3018
|
+
options.waitTimeout,
|
|
3019
|
+
"--wait-timeout",
|
|
3020
|
+
9e5
|
|
3021
|
+
)
|
|
2926
3022
|
}),
|
|
2927
3023
|
readConfigText(cwd, options)
|
|
2928
3024
|
]);
|
|
2929
|
-
const project = await fetchProjectById({
|
|
2930
|
-
baseUrl: context.baseUrl,
|
|
2931
|
-
token: context.token,
|
|
2932
|
-
projectId
|
|
2933
|
-
});
|
|
2934
|
-
const preload = context.user?.id ? await safeFetch({
|
|
2935
|
-
baseUrl: context.baseUrl,
|
|
2936
|
-
authToken: context.token,
|
|
2937
|
-
path: `/reports/preload/${encodeURIComponent(projectId)}?user_id=${encodeURIComponent(context.user.id)}&include_payload=true`
|
|
2938
|
-
}) : void 0;
|
|
2939
3025
|
const data = {
|
|
2940
3026
|
projectId,
|
|
2941
3027
|
repo,
|
|
@@ -4326,7 +4412,7 @@ var runChatRecipe = async (recipe, prompt2, options, command, deps) => {
|
|
|
4326
4412
|
});
|
|
4327
4413
|
progressWriter.write({ type: "auth", step: "auth", message: "Resolving authentication" });
|
|
4328
4414
|
const context = await resolveAuthContext(options, command, deps);
|
|
4329
|
-
const core = await import("./dist-
|
|
4415
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
4330
4416
|
progressWriter.write({
|
|
4331
4417
|
type: "request",
|
|
4332
4418
|
step: "project",
|
|
@@ -5795,7 +5881,7 @@ var configureDiagramExportCommand = (command, deps) => addAuthOptions(command, d
|
|
|
5795
5881
|
const context = requireAuthUser(
|
|
5796
5882
|
await resolveAuthContext(options, actionCommand, deps)
|
|
5797
5883
|
);
|
|
5798
|
-
const core = await import("./dist-
|
|
5884
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
5799
5885
|
const projects = await core.getProjects(
|
|
5800
5886
|
context.baseUrl,
|
|
5801
5887
|
context.token,
|
|
@@ -5872,7 +5958,7 @@ var registerProjectsCommand = (program2, deps) => {
|
|
|
5872
5958
|
addCommon(addAuthOptions(projects.command("list").description("List projects"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
5873
5959
|
try {
|
|
5874
5960
|
const context = await resolveAuthContext(options, command, deps);
|
|
5875
|
-
const core = await import("./dist-
|
|
5961
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
5876
5962
|
const data = await listProjectsForContext(core, context);
|
|
5877
5963
|
const url = buildFrontendUrl({ baseUrl: frontendBase(context, options), target: "projects" });
|
|
5878
5964
|
await writeProjectListOutput({ data, options, frontendUrl: url });
|
|
@@ -5890,7 +5976,7 @@ var registerProjectsCommand = (program2, deps) => {
|
|
|
5890
5976
|
).action(async (id, options, command) => {
|
|
5891
5977
|
try {
|
|
5892
5978
|
const context = await resolveAuthContext(options, command, deps);
|
|
5893
|
-
const core = await import("./dist-
|
|
5979
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
5894
5980
|
const list = await listProjectsForContext(core, context);
|
|
5895
5981
|
const data = list.find((project) => project.id === id);
|
|
5896
5982
|
if (!data) {
|
|
@@ -5955,7 +6041,7 @@ var registerProjectsCommand = (program2, deps) => {
|
|
|
5955
6041
|
try {
|
|
5956
6042
|
assertSingleProjectSource(options);
|
|
5957
6043
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
5958
|
-
const core = await import("./dist-
|
|
6044
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
5959
6045
|
const template = await fileBlob(options.templateFile);
|
|
5960
6046
|
const parameters = await fileBlob(options.parametersFile);
|
|
5961
6047
|
const workspace = options.workspaceDir ? await collectWorkspaceFiles(options.workspaceDir, options) : void 0;
|
|
@@ -6084,7 +6170,7 @@ var registerConnectionsCommand = (program2, deps) => {
|
|
|
6084
6170
|
addCommon2(addAuthOptions(connections.command("list").description("List connections"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
6085
6171
|
try {
|
|
6086
6172
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6087
|
-
const core = await import("./dist-
|
|
6173
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6088
6174
|
const data = await core.listConnections({
|
|
6089
6175
|
baseUrl: context.baseUrl,
|
|
6090
6176
|
authToken: context.token,
|
|
@@ -6109,7 +6195,7 @@ var registerConnectionsCommand = (program2, deps) => {
|
|
|
6109
6195
|
).action(async (id, options, command) => {
|
|
6110
6196
|
try {
|
|
6111
6197
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6112
|
-
const core = await import("./dist-
|
|
6198
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6113
6199
|
const data = await core.getConnection({
|
|
6114
6200
|
baseUrl: context.baseUrl,
|
|
6115
6201
|
authToken: context.token,
|
|
@@ -6447,7 +6533,7 @@ var checkoutReturnUrl = (context, options) => options.returnTo || billingUrl(con
|
|
|
6447
6533
|
var runTopUpCheckout = async (commandName, packId, options, command, deps) => {
|
|
6448
6534
|
try {
|
|
6449
6535
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6450
|
-
const core = await import("./dist-
|
|
6536
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6451
6537
|
const returnTo = checkoutReturnUrl(context, options);
|
|
6452
6538
|
const session = await core.createTopUpCheckoutSession({
|
|
6453
6539
|
baseUrl: context.baseUrl,
|
|
@@ -6487,7 +6573,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
6487
6573
|
).action(async (options, command) => {
|
|
6488
6574
|
try {
|
|
6489
6575
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6490
|
-
const core = await import("./dist-
|
|
6576
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6491
6577
|
const range = rangeToDates("30d");
|
|
6492
6578
|
const [entitlement, usageSummary] = await Promise.all([
|
|
6493
6579
|
core.getBillingEntitlement({
|
|
@@ -6517,7 +6603,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
6517
6603
|
addCommon3(addAuthOptions(billing.command("summary").description("Show billing summary"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
6518
6604
|
try {
|
|
6519
6605
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6520
|
-
const core = await import("./dist-
|
|
6606
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6521
6607
|
const range = rangeToDates("30d");
|
|
6522
6608
|
const [entitlement, subscriptionStatus, usageSummary] = await Promise.all([
|
|
6523
6609
|
core.getBillingEntitlement({ baseUrl: context.baseUrl, authToken: context.token }),
|
|
@@ -6553,7 +6639,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
6553
6639
|
addCommon3(addAuthOptions(billing.command("plans").description("Show billing plans"), deps.defaultBaseUrl)).action(async (options, command) => {
|
|
6554
6640
|
try {
|
|
6555
6641
|
const context = await resolveAuthContext(options, command, deps);
|
|
6556
|
-
const core = await import("./dist-
|
|
6642
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6557
6643
|
const data = await core.getBillingConfig({ baseUrl: context.baseUrl, authToken: context.token });
|
|
6558
6644
|
const url = billingUrl(context, { ...options, tab: "plans" });
|
|
6559
6645
|
await write("billing plans", data, options, url);
|
|
@@ -6565,7 +6651,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
6565
6651
|
addCommon3(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) => {
|
|
6566
6652
|
try {
|
|
6567
6653
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6568
|
-
const core = await import("./dist-
|
|
6654
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6569
6655
|
const range = rangeToDates(options.range);
|
|
6570
6656
|
const data = await core.getBillingUsageSummary({
|
|
6571
6657
|
baseUrl: context.baseUrl,
|
|
@@ -6588,7 +6674,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
6588
6674
|
addCommon3(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) => {
|
|
6589
6675
|
try {
|
|
6590
6676
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6591
|
-
const core = await import("./dist-
|
|
6677
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6592
6678
|
const range = rangeToDates(options.range);
|
|
6593
6679
|
const data = await core.getBillingUsageLedger({
|
|
6594
6680
|
baseUrl: context.baseUrl,
|
|
@@ -6616,7 +6702,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
6616
6702
|
addCommon3(addAuthOptions(billing.command(name).description(`Show billing ${name}`), deps.defaultBaseUrl)).option("--limit <n>", "Result limit", "25").action(async (options, command) => {
|
|
6617
6703
|
try {
|
|
6618
6704
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6619
|
-
const core = await import("./dist-
|
|
6705
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6620
6706
|
const data = await core[getter]({
|
|
6621
6707
|
baseUrl: context.baseUrl,
|
|
6622
6708
|
authToken: context.token,
|
|
@@ -6634,7 +6720,7 @@ var registerBillingCommands = (program2, deps) => {
|
|
|
6634
6720
|
addCommon3(addAuthOptions(topups, deps.defaultBaseUrl)).option("--limit <n>", "Result limit", "25").action(async (options, command) => {
|
|
6635
6721
|
try {
|
|
6636
6722
|
const context = requireAuthUser(await resolveAuthContext(options, command, deps));
|
|
6637
|
-
const core = await import("./dist-
|
|
6723
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
6638
6724
|
const data = await core.getTopUpPacks({
|
|
6639
6725
|
baseUrl: context.baseUrl,
|
|
6640
6726
|
authToken: context.token
|
|
@@ -6906,7 +6992,7 @@ var validateTemplate = async (input) => fetchCloudEvalJson({
|
|
|
6906
6992
|
userId: input.userId
|
|
6907
6993
|
})
|
|
6908
6994
|
});
|
|
6909
|
-
var
|
|
6995
|
+
var sleep3 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
6910
6996
|
var recordValue = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
6911
6997
|
var stringField = (value, field) => {
|
|
6912
6998
|
const raw = value?.[field];
|
|
@@ -7087,7 +7173,7 @@ var waitForTemplateValidationResult = async (input) => {
|
|
|
7087
7173
|
`Template validation job ${jobId} did not finish within ${waitTimeoutMs}ms.`
|
|
7088
7174
|
);
|
|
7089
7175
|
}
|
|
7090
|
-
await
|
|
7176
|
+
await sleep3(Math.min(pollIntervalMs, Math.max(1, deadline - Date.now())));
|
|
7091
7177
|
}
|
|
7092
7178
|
if (!isSuccessfulJobStatus(status)) {
|
|
7093
7179
|
throw new Error(
|
|
@@ -9269,7 +9355,7 @@ var isTerminalJobStatus4 = (value) => {
|
|
|
9269
9355
|
"canceled"
|
|
9270
9356
|
].includes(status);
|
|
9271
9357
|
};
|
|
9272
|
-
var
|
|
9358
|
+
var sleep4 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
9273
9359
|
var writeHeaderFile = async (outputPath, headers) => {
|
|
9274
9360
|
await fs9.mkdir(path6.dirname(outputPath), { recursive: true });
|
|
9275
9361
|
const text = Object.entries(headers).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => `${key}: ${value}`).join("\n");
|
|
@@ -9305,7 +9391,7 @@ var reportsFrontendUrl = (config, input) => buildFrontendUrl({
|
|
|
9305
9391
|
reportVerbosity: input.reportVerbosity
|
|
9306
9392
|
});
|
|
9307
9393
|
var resolveAuth = async (config, options = {}) => {
|
|
9308
|
-
const core = await import("./dist-
|
|
9394
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
9309
9395
|
core.assertSecureBaseUrl(config.baseUrl);
|
|
9310
9396
|
let token;
|
|
9311
9397
|
try {
|
|
@@ -9401,7 +9487,7 @@ var assertModelAvailable = async (config, token) => {
|
|
|
9401
9487
|
if (!config.model) {
|
|
9402
9488
|
return;
|
|
9403
9489
|
}
|
|
9404
|
-
const core = await import("./dist-
|
|
9490
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
9405
9491
|
try {
|
|
9406
9492
|
const response = await fetch(
|
|
9407
9493
|
`${core.normalizeApiBase(config.baseUrl)}/models`,
|
|
@@ -9449,7 +9535,7 @@ var waitForReportJobs2 = async (input) => {
|
|
|
9449
9535
|
if (isTerminalJobStatus4(lastStatus)) {
|
|
9450
9536
|
break;
|
|
9451
9537
|
}
|
|
9452
|
-
await
|
|
9538
|
+
await sleep4(input.pollIntervalMs);
|
|
9453
9539
|
}
|
|
9454
9540
|
finalStatuses.push(lastStatus);
|
|
9455
9541
|
}
|
|
@@ -9658,7 +9744,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
9658
9744
|
});
|
|
9659
9745
|
handlers.set("agent_profiles_list", async (args) => {
|
|
9660
9746
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
9661
|
-
const core = await import("./dist-
|
|
9747
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
9662
9748
|
const data = await listProfilesForDiscovery(core, config.baseUrl);
|
|
9663
9749
|
return withEnvelope({
|
|
9664
9750
|
command: "agents list",
|
|
@@ -9671,7 +9757,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
9671
9757
|
throw new Error("profileId is required.");
|
|
9672
9758
|
}
|
|
9673
9759
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
9674
|
-
const core = await import("./dist-
|
|
9760
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
9675
9761
|
const data = await getProfileForDiscovery(core, config.baseUrl, profileId);
|
|
9676
9762
|
return withEnvelope({
|
|
9677
9763
|
command: "agents show",
|
|
@@ -10308,7 +10394,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
10308
10394
|
});
|
|
10309
10395
|
handlers.set("auth_status", async (args) => {
|
|
10310
10396
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
10311
|
-
const core = await import("./dist-
|
|
10397
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
10312
10398
|
const data = await core.getAuthStatus(config.baseUrl, { validate: true });
|
|
10313
10399
|
return withEnvelope({
|
|
10314
10400
|
command: "auth status",
|
|
@@ -10317,7 +10403,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
10317
10403
|
});
|
|
10318
10404
|
handlers.set("status", async (args) => {
|
|
10319
10405
|
const config = await resolveInvocationConfig(serverOptions, args);
|
|
10320
|
-
const core = await import("./dist-
|
|
10406
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
10321
10407
|
const auth = await core.getAuthStatus(config.baseUrl, { validate: true });
|
|
10322
10408
|
return withEnvelope({
|
|
10323
10409
|
command: "status",
|
|
@@ -10348,7 +10434,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
10348
10434
|
}
|
|
10349
10435
|
];
|
|
10350
10436
|
try {
|
|
10351
|
-
const core = await import("./dist-
|
|
10437
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
10352
10438
|
core.assertSecureBaseUrl(config.baseUrl);
|
|
10353
10439
|
checks.push({
|
|
10354
10440
|
id: "base-url-secure",
|
|
@@ -10868,7 +10954,7 @@ var buildToolHandlers = (serverOptions) => {
|
|
|
10868
10954
|
} catch {
|
|
10869
10955
|
token = config.accessKey;
|
|
10870
10956
|
}
|
|
10871
|
-
const core = await import("./dist-
|
|
10957
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
10872
10958
|
const data = await core.getBillingConfig({
|
|
10873
10959
|
baseUrl: config.baseUrl,
|
|
10874
10960
|
authToken: token
|
|
@@ -11722,7 +11808,7 @@ var registerCapabilitiesCommand = (program2, deps) => {
|
|
|
11722
11808
|
warnIfAccessKeyFromCliOption(options, command);
|
|
11723
11809
|
let data = capabilities;
|
|
11724
11810
|
if (options.live) {
|
|
11725
|
-
const core = await import("./dist-
|
|
11811
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
11726
11812
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
11727
11813
|
const accessKey = options.accessKeyStdin ? await deps.readStdinValue() : options.accessKey;
|
|
11728
11814
|
const token = await core.getAuthToken({ accessKey, baseUrl });
|
|
@@ -11860,7 +11946,7 @@ var writeCredentialOutput = async (input) => {
|
|
|
11860
11946
|
};
|
|
11861
11947
|
var resolveCoreAuth = async (options, command, deps) => {
|
|
11862
11948
|
const context = await resolveAuthContext(options, command, deps);
|
|
11863
|
-
const core = await import("./dist-
|
|
11949
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
11864
11950
|
return { ...context, core };
|
|
11865
11951
|
};
|
|
11866
11952
|
var parseCapabilities = (value) => value?.split(",").map((item) => item.trim()).filter(Boolean);
|
|
@@ -12177,7 +12263,7 @@ var registerAgentsCommand = (program2, deps) => {
|
|
|
12177
12263
|
const agents = program2.command("agents").description("CloudEval Agent Profile utilities");
|
|
12178
12264
|
addAgentOutputOptions(agents.command("list").description("List Agent Profiles"), deps).action(async (options, command) => {
|
|
12179
12265
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
12180
|
-
const core = await import("./dist-
|
|
12266
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
12181
12267
|
core.assertSecureBaseUrl(baseUrl);
|
|
12182
12268
|
const data = await listProfilesForDiscovery2(core, baseUrl);
|
|
12183
12269
|
await writeProfiles({
|
|
@@ -12193,7 +12279,7 @@ var registerAgentsCommand = (program2, deps) => {
|
|
|
12193
12279
|
deps
|
|
12194
12280
|
).action(async (profileId, options, command) => {
|
|
12195
12281
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
12196
|
-
const core = await import("./dist-
|
|
12282
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
12197
12283
|
core.assertSecureBaseUrl(baseUrl);
|
|
12198
12284
|
const data = await getProfileForDiscovery2(core, baseUrl, profileId);
|
|
12199
12285
|
await writeProfiles({
|
|
@@ -12212,7 +12298,7 @@ var registerAgentsCommand = (program2, deps) => {
|
|
|
12212
12298
|
const cliProfile = getActiveConfigProfile(command);
|
|
12213
12299
|
const cliConfig = await loadCliConfig(cliProfile);
|
|
12214
12300
|
const auth = await resolveAuthContext(options, command, deps);
|
|
12215
|
-
const core = await import("./dist-
|
|
12301
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
12216
12302
|
const profileResponse = await core.getAgentProfile({
|
|
12217
12303
|
baseUrl: auth.baseUrl,
|
|
12218
12304
|
authToken: auth.token,
|
|
@@ -12710,7 +12796,7 @@ var registerDiagnosticsCommands = (program2, deps) => {
|
|
|
12710
12796
|
const baseUrl = await deps.resolveBaseUrl(options, command);
|
|
12711
12797
|
const profile = getActiveConfigProfile(command);
|
|
12712
12798
|
const config = await loadCliConfig(profile);
|
|
12713
|
-
const core = await import("./dist-
|
|
12799
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
12714
12800
|
const auth = await core.getAuthStatus(baseUrl, { validate: true });
|
|
12715
12801
|
if (options.format === "text" || !options.format) {
|
|
12716
12802
|
process.stdout.write(
|
|
@@ -12760,7 +12846,7 @@ var registerDiagnosticsCommands = (program2, deps) => {
|
|
|
12760
12846
|
detail: getCliConfigPath(profile)
|
|
12761
12847
|
});
|
|
12762
12848
|
try {
|
|
12763
|
-
const core = await import("./dist-
|
|
12849
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
12764
12850
|
core.assertSecureBaseUrl(baseUrl);
|
|
12765
12851
|
checks.push({
|
|
12766
12852
|
id: "base-url-secure",
|
|
@@ -12860,7 +12946,7 @@ var resolveToken2 = async (options, deps, baseUrl, command) => {
|
|
|
12860
12946
|
return options.accessKey;
|
|
12861
12947
|
}
|
|
12862
12948
|
try {
|
|
12863
|
-
const core = await import("./dist-
|
|
12949
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
12864
12950
|
return await core.getAuthToken({
|
|
12865
12951
|
baseUrl
|
|
12866
12952
|
});
|
|
@@ -12944,7 +13030,7 @@ var registerModelsCommand = (program2, deps) => {
|
|
|
12944
13030
|
let source = "fallback";
|
|
12945
13031
|
let modelList = fallbackModels;
|
|
12946
13032
|
try {
|
|
12947
|
-
const core = await import("./dist-
|
|
13033
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
12948
13034
|
const response = await fetch(`${core.normalizeApiBase(baseUrl)}/models`, {
|
|
12949
13035
|
headers: {
|
|
12950
13036
|
Accept: "application/json",
|
|
@@ -14123,7 +14209,7 @@ var uninstallCompletionScript = async (shell) => {
|
|
|
14123
14209
|
var runInteractiveLoginOnboarding = async (baseUrl, token) => {
|
|
14124
14210
|
const [{ render }, { Onboarding }] = await Promise.all([
|
|
14125
14211
|
import("ink"),
|
|
14126
|
-
import("./Onboarding-
|
|
14212
|
+
import("./Onboarding-SAYMQ36N.js")
|
|
14127
14213
|
]);
|
|
14128
14214
|
await new Promise((resolve) => {
|
|
14129
14215
|
let app;
|
|
@@ -14445,7 +14531,7 @@ var resolveBaseUrl = async (options, command) => {
|
|
|
14445
14531
|
});
|
|
14446
14532
|
}
|
|
14447
14533
|
try {
|
|
14448
|
-
const { getAuthStatus } = await import("./dist-
|
|
14534
|
+
const { getAuthStatus } = await import("./dist-QLN52XKY.js");
|
|
14449
14535
|
const status = await getAuthStatus();
|
|
14450
14536
|
const storedBaseUrl = status.baseUrl;
|
|
14451
14537
|
if (storedBaseUrl && shouldUseStoredBaseUrl(storedBaseUrl)) {
|
|
@@ -14519,7 +14605,7 @@ program.command("login").description("Authenticate with Cloudeval").option(
|
|
|
14519
14605
|
checkUserStatus,
|
|
14520
14606
|
ensurePlaygroundProject,
|
|
14521
14607
|
login
|
|
14522
|
-
} = await import("./dist-
|
|
14608
|
+
} = await import("./dist-QLN52XKY.js");
|
|
14523
14609
|
assertSecureBaseUrl(options.baseUrl);
|
|
14524
14610
|
const headlessEnvironment = isHeadlessEnvironment();
|
|
14525
14611
|
const headlessLogin = options.headless || headlessEnvironment;
|
|
@@ -14594,7 +14680,7 @@ program.command("logout").description("Log out and clear stored authentication s
|
|
|
14594
14680
|
DEFAULT_BASE_URL
|
|
14595
14681
|
).option("--all-devices", "Revoke sessions on all devices", false).action(async (options) => {
|
|
14596
14682
|
try {
|
|
14597
|
-
const { assertSecureBaseUrl, logout } = await import("./dist-
|
|
14683
|
+
const { assertSecureBaseUrl, logout } = await import("./dist-QLN52XKY.js");
|
|
14598
14684
|
assertSecureBaseUrl(options.baseUrl);
|
|
14599
14685
|
const result = await logout({
|
|
14600
14686
|
baseUrl: options.baseUrl,
|
|
@@ -14628,7 +14714,7 @@ authCommand.command("status").description("Show current authentication status").
|
|
|
14628
14714
|
DEFAULT_BASE_URL
|
|
14629
14715
|
).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) => {
|
|
14630
14716
|
try {
|
|
14631
|
-
const { assertSecureBaseUrl, getAuthStatus } = await import("./dist-
|
|
14717
|
+
const { assertSecureBaseUrl, getAuthStatus } = await import("./dist-QLN52XKY.js");
|
|
14632
14718
|
const effectiveBaseUrl = await resolveBaseUrl(options, command);
|
|
14633
14719
|
assertSecureBaseUrl(effectiveBaseUrl);
|
|
14634
14720
|
const status = await getAuthStatus(effectiveBaseUrl, { validate: true });
|
|
@@ -14845,10 +14931,10 @@ program.command("tui").description("Open the CloudEval Terminal UI").option(
|
|
|
14845
14931
|
"Access key for automation",
|
|
14846
14932
|
process.env.CLOUDEVAL_ACCESS_KEY
|
|
14847
14933
|
).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) => {
|
|
14848
|
-
const { assertSecureBaseUrl } = await import("./dist-
|
|
14934
|
+
const { assertSecureBaseUrl } = await import("./dist-QLN52XKY.js");
|
|
14849
14935
|
const [{ render }, { App }] = await Promise.all([
|
|
14850
14936
|
import("ink"),
|
|
14851
|
-
import("./App-
|
|
14937
|
+
import("./App-74TOEWUN.js")
|
|
14852
14938
|
]);
|
|
14853
14939
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
14854
14940
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -14903,10 +14989,10 @@ program.command("chat").description("Start an interactive chat session").option(
|
|
|
14903
14989
|
"Access key for automation",
|
|
14904
14990
|
process.env.CLOUDEVAL_ACCESS_KEY
|
|
14905
14991
|
).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) => {
|
|
14906
|
-
const { assertSecureBaseUrl } = await import("./dist-
|
|
14992
|
+
const { assertSecureBaseUrl } = await import("./dist-QLN52XKY.js");
|
|
14907
14993
|
const [{ render }, { App }] = await Promise.all([
|
|
14908
14994
|
import("ink"),
|
|
14909
|
-
import("./App-
|
|
14995
|
+
import("./App-74TOEWUN.js")
|
|
14910
14996
|
]);
|
|
14911
14997
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
14912
14998
|
assertSecureBaseUrl(baseUrl);
|
|
@@ -14981,7 +15067,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
14981
15067
|
const question = Array.isArray(questionParts) ? questionParts.join(" ") : String(questionParts);
|
|
14982
15068
|
const commandName = command.parent?.args?.[0] === "agent" ? "agent" : "ask";
|
|
14983
15069
|
const selectedMode = commandName === "agent" ? "agent" : "ask";
|
|
14984
|
-
const { assertSecureBaseUrl } = await import("./dist-
|
|
15070
|
+
const { assertSecureBaseUrl } = await import("./dist-QLN52XKY.js");
|
|
14985
15071
|
const baseUrl = await resolveBaseUrl(options, command);
|
|
14986
15072
|
assertSecureBaseUrl(baseUrl);
|
|
14987
15073
|
const selectedProfile = getActiveConfigProfile(command);
|
|
@@ -15022,7 +15108,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
15022
15108
|
const fs14 = await import("fs");
|
|
15023
15109
|
const fsPromises = await import("fs/promises");
|
|
15024
15110
|
const { randomUUID: randomUUID5 } = await import("crypto");
|
|
15025
|
-
const core = await import("./dist-
|
|
15111
|
+
const core = await import("./dist-QLN52XKY.js");
|
|
15026
15112
|
const {
|
|
15027
15113
|
streamChat,
|
|
15028
15114
|
reduceChunk,
|
|
@@ -15078,7 +15164,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
15078
15164
|
console.error("Authentication required. Starting login process...\n");
|
|
15079
15165
|
}
|
|
15080
15166
|
try {
|
|
15081
|
-
const { login } = await import("./dist-
|
|
15167
|
+
const { login } = await import("./dist-QLN52XKY.js");
|
|
15082
15168
|
verboseLog("Calling interactive login", { baseUrl });
|
|
15083
15169
|
token = await login(baseUrl, {
|
|
15084
15170
|
headless: isHeadlessEnvironment()
|
|
@@ -15142,7 +15228,7 @@ program.command("ask").alias("agent").description("Ask a single question or run
|
|
|
15142
15228
|
message: error.message
|
|
15143
15229
|
});
|
|
15144
15230
|
}
|
|
15145
|
-
const { resolveAskProject } = await import("./resolveAskProject-
|
|
15231
|
+
const { resolveAskProject } = await import("./resolveAskProject-WOMNHUYT.js");
|
|
15146
15232
|
let project;
|
|
15147
15233
|
try {
|
|
15148
15234
|
project = await resolveAskProject({
|
|
@@ -15660,7 +15746,7 @@ Error: ${errorMsg}
|
|
|
15660
15746
|
program.command("banner").description("Preview the startup banner and terminal capabilities").action(async () => {
|
|
15661
15747
|
const { render } = await import("ink");
|
|
15662
15748
|
const BannerPreview = React.lazy(async () => ({
|
|
15663
|
-
default: (await import("./Banner-
|
|
15749
|
+
default: (await import("./Banner-JWHQ4HG5.js")).Banner
|
|
15664
15750
|
}));
|
|
15665
15751
|
render(
|
|
15666
15752
|
/* @__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-QLN52XKY.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.26.
|
|
17
|
+
"versionInfo": "0.26.3",
|
|
18
18
|
"downloadLocation": "https://github.com/ganakailabs/cloudeval-cli",
|
|
19
19
|
"filesAnalyzed": false,
|
|
20
20
|
"licenseConcluded": "LicenseRef-CloudEval-CLI",
|