@ganakailabs/cloudeval-cli 0.26.10 → 0.26.12

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/README.md CHANGED
@@ -81,12 +81,14 @@ cloudeval capabilities --format json
81
81
  Telemetry is default-on and uses curated Azure Application Insights custom
82
82
  events only. CloudEval records command family, success, duration, safe option
83
83
  enums, CLI/runtime versions, OS major version, architecture, install source,
84
- update/install outcomes, MCP tool names, and TUI metadata. After login, events
85
- may include signed-in email and first/last/full name.
84
+ update/install outcomes, MCP tool names, TUI metadata, a W3C `traceId`, and a
85
+ per-command `requestId` for backend correlation. After login, events may include
86
+ a hashed internal user ID only.
86
87
 
87
88
  Telemetry does not include prompts, command output, tokens, local paths, project
88
- or resource IDs, account/session/tenant IDs, stack traces, raw error messages,
89
- or cloud resource names.
89
+ or resource IDs, raw email/name fields, account/session/tenant IDs, stack
90
+ traces, raw error messages, command arguments, cwd, file paths, or cloud
91
+ resource names.
90
92
 
91
93
  ```bash
92
94
  cloudeval config set telemetry.enabled false
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-QSBGUI25.js";
9
9
  import {
10
10
  Onboarding
11
- } from "./chunk-AO6RCQ3P.js";
11
+ } from "./chunk-LRQBWG3N.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-2OLI5VOG.js";
38
+ } from "./chunk-USSCB2ZU.js";
39
39
  import {
40
40
  Banner
41
- } from "./chunk-MDLBOB5A.js";
41
+ } from "./chunk-GR76HJZF.js";
42
42
  import {
43
43
  CLI_VERSION
44
- } from "./chunk-IVGJTC5I.js";
44
+ } from "./chunk-4AK6A5GF.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-MQQKC6DZ.js");
5917
+ const { extractEmailFromToken } = await import("./dist-PEYJDO7A.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-MQQKC6DZ.js");
7353
+ const { login } = await import("./dist-PEYJDO7A.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-MDLBOB5A.js";
7
- import "./chunk-IVGJTC5I.js";
6
+ } from "./chunk-GR76HJZF.js";
7
+ import "./chunk-4AK6A5GF.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-AO6RCQ3P.js";
4
- import "./chunk-2OLI5VOG.js";
3
+ } from "./chunk-LRQBWG3N.js";
4
+ import "./chunk-USSCB2ZU.js";
5
5
  import "./chunk-ZDKRIOMB.js";
6
6
  export {
7
7
  Onboarding
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var CLI_VERSION = "0.26.10";
2
+ var CLI_VERSION = "0.26.12";
3
3
 
4
4
  export {
5
5
  CLI_VERSION
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CLI_VERSION
3
- } from "./chunk-IVGJTC5I.js";
3
+ } from "./chunk-4AK6A5GF.js";
4
4
  import {
5
5
  shouldUseColor,
6
6
  terminalTheme
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  completeOnboarding
3
- } from "./chunk-2OLI5VOG.js";
3
+ } from "./chunk-USSCB2ZU.js";
4
4
  import {
5
5
  terminalTheme
6
6
  } from "./chunk-ZDKRIOMB.js";
@@ -288,8 +288,48 @@ import fs from "fs";
288
288
  import os from "os";
289
289
  import path from "path";
290
290
  import { execFileSync, spawn, spawnSync } from "child_process";
291
- import { randomUUID } from "crypto";
291
+ import { randomBytes, randomUUID } from "crypto";
292
292
  import { randomUUID as randomUUID2 } from "crypto";
293
+ import { randomUUID as randomUUID3 } from "crypto";
294
+ var randomHex = (byteLength) => {
295
+ let value = "";
296
+ do {
297
+ value = randomBytes(byteLength).toString("hex");
298
+ } while (/^0+$/.test(value));
299
+ return value;
300
+ };
301
+ var createCLITraceContext = () => {
302
+ const traceId = randomHex(16);
303
+ const spanId = randomHex(8);
304
+ const requestId = randomUUID();
305
+ return {
306
+ traceId,
307
+ spanId,
308
+ traceparent: `00-${traceId}-${spanId}-01`,
309
+ requestId,
310
+ correlationId: requestId
311
+ };
312
+ };
313
+ var activeCLITraceContext;
314
+ var setActiveCLITraceContext = (context) => {
315
+ activeCLITraceContext = context;
316
+ };
317
+ var getActiveCLITraceContext = () => activeCLITraceContext;
318
+ var clearActiveCLITraceContext = () => {
319
+ activeCLITraceContext = void 0;
320
+ };
321
+ var getActiveCLITraceHeaders = () => {
322
+ const context = getActiveCLITraceContext();
323
+ if (!context) {
324
+ return {};
325
+ }
326
+ return {
327
+ traceparent: context.traceparent,
328
+ ...context.tracestate ? { tracestate: context.tracestate } : {},
329
+ "x-request-id": context.requestId,
330
+ "x-correlation-id": context.correlationId
331
+ };
332
+ };
293
333
  var DEFAULT_BASE_URL = "https://cloudeval.ai/api/proxy/v1";
294
334
  var DEFAULT_FRONTEND_URL = "https://cloudeval.ai";
295
335
  var TOKEN_EXPIRY_SKEW_MS = 12e4;
@@ -971,7 +1011,8 @@ var getCLIHeaders = (token) => {
971
1011
  const headers = {
972
1012
  "X-Client-Type": "cloudeval-cli",
973
1013
  "X-Client-Version": "0.1.0",
974
- "Content-Type": "application/json"
1014
+ "Content-Type": "application/json",
1015
+ ...getActiveCLITraceHeaders()
975
1016
  };
976
1017
  if (token) {
977
1018
  headers.Authorization = `Bearer ${token}`;
@@ -1738,7 +1779,7 @@ var getAuthHeader = async (options = {}) => {
1738
1779
  const token = await getAuthToken(options);
1739
1780
  return { Authorization: `Bearer ${token}` };
1740
1781
  };
1741
- var createIdempotencyKey = () => randomUUID();
1782
+ var createIdempotencyKey = () => randomUUID2();
1742
1783
  var withIdempotencyHeader = (headers, idempotencyKey) => ({
1743
1784
  ...headers,
1744
1785
  "Idempotency-Key": idempotencyKey ?? createIdempotencyKey()
@@ -2015,7 +2056,8 @@ async function* streamChat(options) {
2015
2056
  "Content-Type": "application/json",
2016
2057
  Accept: "text/event-stream",
2017
2058
  "X-Client-Type": "cloudeval-cli",
2018
- "X-Client-Version": "0.1.0"
2059
+ "X-Client-Version": "0.1.0",
2060
+ ...getActiveCLITraceHeaders()
2019
2061
  });
2020
2062
  if (options.authToken) {
2021
2063
  headers.Authorization = `Bearer ${options.authToken}`;
@@ -2278,7 +2320,7 @@ var ensureAssistantMessage = (state, timestamp) => {
2278
2320
  (m) => m.role === "assistant" && m.pending ? { ...m, pending: false, updatedAt: timestamp } : m
2279
2321
  );
2280
2322
  const message = {
2281
- id: randomUUID2(),
2323
+ id: randomUUID3(),
2282
2324
  role: "assistant",
2283
2325
  content: "",
2284
2326
  pending: true,
@@ -3635,6 +3677,11 @@ export {
3635
3677
  BUNDLED_AGENT_PROFILES,
3636
3678
  getBundledAgentProfiles,
3637
3679
  getBundledAgentProfile,
3680
+ createCLITraceContext,
3681
+ setActiveCLITraceContext,
3682
+ getActiveCLITraceContext,
3683
+ clearActiveCLITraceContext,
3684
+ getActiveCLITraceHeaders,
3638
3685
  assertSecureBaseUrl,
3639
3686
  normalizeApiBase,
3640
3687
  clearAuthSession,