@uipath/ixp-tool 1.199.0-preview.97 → 1.199.0

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/index.js CHANGED
@@ -2146,7 +2146,7 @@ var {
2146
2146
  var package_default = {
2147
2147
  name: "@uipath/ixp-tool",
2148
2148
  license: "MIT",
2149
- version: "1.199.0-preview.97",
2149
+ version: "1.199.0",
2150
2150
  description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
2151
2151
  private: false,
2152
2152
  repository: {
@@ -2196,4 +2196,4 @@ program2.name("ixp-tool").description("UiPath IXP Tool - Standalone CLI").versio
2196
2196
  await registerCommands(program2);
2197
2197
  program2.parse(process.argv);
2198
2198
 
2199
- //# debugId=2473380787EEBDA364756E2164756E21
2199
+ //# debugId=C7D158A40B354EFD64756E2164756E21
package/dist/tool.js CHANGED
@@ -21230,7 +21230,7 @@ var init_server = __esm(() => {
21230
21230
  var package_default = {
21231
21231
  name: "@uipath/ixp-tool",
21232
21232
  license: "MIT",
21233
- version: "1.199.0-preview.97",
21233
+ version: "1.199.0",
21234
21234
  description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
21235
21235
  private: false,
21236
21236
  repository: {
@@ -24558,7 +24558,7 @@ function requireOmap() {
24558
24558
  function resolveYamlOmap(data) {
24559
24559
  if (data === null)
24560
24560
  return true;
24561
- const objectKeys = [];
24561
+ const objectKeys = {};
24562
24562
  const object = data;
24563
24563
  for (let index = 0, length = object.length;index < length; index += 1) {
24564
24564
  const pair = object[index];
@@ -24576,10 +24576,9 @@ function requireOmap() {
24576
24576
  }
24577
24577
  if (!pairHasKey)
24578
24578
  return false;
24579
- if (objectKeys.indexOf(pairKey) === -1)
24580
- objectKeys.push(pairKey);
24581
- else
24579
+ if (_hasOwnProperty.call(objectKeys, pairKey))
24582
24580
  return false;
24581
+ Object.defineProperty(objectKeys, pairKey, { value: true });
24583
24582
  }
24584
24583
  return true;
24585
24584
  }
@@ -27440,8 +27439,18 @@ function getInboundTraceContext() {
27440
27439
 
27441
27440
  // ../common/src/telemetry/session-id.ts
27442
27441
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
27443
- var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
27444
- var telemetrySessionIdSlot = singleton("TelemetrySessionId");
27442
+ var SESSION_ID_MAX_LENGTH = 64;
27443
+ var RANDOM_SESSION_ID_LENGTH = 32;
27444
+ var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
27445
+ var CONTROL_CHARACTERS = /\p{Cc}/gu;
27446
+ var INHERITED_SESSION_SOURCES = [
27447
+ { envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
27448
+ { envVar: "CODEX_THREAD_ID", source: "codex" },
27449
+ { envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
27450
+ { envVar: "TERM_SESSION_ID", source: "terminal" },
27451
+ { envVar: "WT_SESSION", source: "terminal" }
27452
+ ];
27453
+ var telemetrySessionSlot = singleton("TelemetrySession");
27445
27454
  var telemetryOperationIdSlot = singleton("TelemetryOperationId");
27446
27455
  function getProcessEnv2() {
27447
27456
  return globalThis.process?.env;
@@ -27450,14 +27459,42 @@ function normalizeSessionId(value) {
27450
27459
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
27451
27460
  return;
27452
27461
  }
27453
- const trimmed = String(value).trim();
27454
- return trimmed || undefined;
27462
+ const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
27463
+ return cleaned || undefined;
27455
27464
  }
27456
27465
  function getConfiguredTelemetrySessionId() {
27457
27466
  return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
27458
27467
  }
27459
- function resolveTelemetrySessionId(existingSessionId) {
27460
- return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
27468
+ function getInheritedSession(env) {
27469
+ for (const candidate of INHERITED_SESSION_SOURCES) {
27470
+ const handle = normalizeSessionId(env[candidate.envVar]);
27471
+ if (handle) {
27472
+ return { id: handle, source: candidate.source };
27473
+ }
27474
+ }
27475
+ return;
27476
+ }
27477
+ function generateRandomSession() {
27478
+ const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
27479
+ crypto.getRandomValues(bytes);
27480
+ let hex = "";
27481
+ for (const byte of bytes) {
27482
+ hex += byte.toString(16).padStart(2, "0");
27483
+ }
27484
+ return { id: hex, source: "random" };
27485
+ }
27486
+ function resolveTelemetrySession() {
27487
+ const existing = telemetrySessionSlot.get();
27488
+ if (existing) {
27489
+ return existing;
27490
+ }
27491
+ const declaredHandle = getConfiguredTelemetrySessionId();
27492
+ const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
27493
+ telemetrySessionSlot.set(resolved);
27494
+ return resolved;
27495
+ }
27496
+ function getTelemetrySessionSource() {
27497
+ return resolveTelemetrySession().source;
27461
27498
  }
27462
27499
  function getTelemetryOperationId() {
27463
27500
  const existing = telemetryOperationIdSlot.get();
@@ -27734,24 +27771,18 @@ class TelemetryService {
27734
27771
  }
27735
27772
  enrichPropertiesWithContext(properties, context) {
27736
27773
  const globalProperties = getGlobalTelemetryProperties();
27737
- const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
27738
- const sessionId = resolveTelemetrySessionId(existingSessionId);
27739
27774
  const enriched = {
27740
27775
  ...getExecutionContextTelemetryProperties(),
27741
27776
  ...globalProperties,
27742
27777
  ...this.defaultProperties,
27743
27778
  ...redactProperties(properties ?? {}),
27779
+ [TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
27744
27780
  ...context ? {
27745
27781
  [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
27746
27782
  ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
27747
27783
  [TELEMETRY_SPAN_ID_PROPERTY]: context.id
27748
27784
  } : {}
27749
27785
  };
27750
- if (sessionId === undefined) {
27751
- delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
27752
- } else {
27753
- enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
27754
- }
27755
27786
  return enriched;
27756
27787
  }
27757
27788
  generateId() {
@@ -29925,7 +29956,7 @@ init_server();
29925
29956
  var package_default2 = {
29926
29957
  name: "@uipath/ixp-sdk",
29927
29958
  license: "MIT",
29928
- version: "1.199.0-preview.97",
29959
+ version: "1.199.0",
29929
29960
  description: "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
29930
29961
  repository: {
29931
29962
  type: "git",
@@ -32513,4 +32544,4 @@ export {
32513
32544
  metadata
32514
32545
  };
32515
32546
 
32516
- //# debugId=E2E558D917F22EA964756E2164756E21
32547
+ //# debugId=EE0FD77FA715854E64756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/ixp-tool",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.97",
4
+ "version": "1.199.0",
5
5
  "description": "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
6
6
  "private": false,
7
7
  "repository": {
@@ -26,5 +26,5 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
29
+ "gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
30
30
  }