@uipath/agent-tool 1.199.0-preview.99 → 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.
Files changed (2) hide show
  1. package/dist/tool.js +121 -41
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -6262,7 +6262,7 @@ function requireOmap() {
6262
6262
  function resolveYamlOmap(data) {
6263
6263
  if (data === null)
6264
6264
  return true;
6265
- const objectKeys = [];
6265
+ const objectKeys = {};
6266
6266
  const object = data;
6267
6267
  for (let index = 0, length = object.length;index < length; index += 1) {
6268
6268
  const pair = object[index];
@@ -6280,10 +6280,9 @@ function requireOmap() {
6280
6280
  }
6281
6281
  if (!pairHasKey)
6282
6282
  return false;
6283
- if (objectKeys.indexOf(pairKey) === -1)
6284
- objectKeys.push(pairKey);
6285
- else
6283
+ if (_hasOwnProperty.call(objectKeys, pairKey))
6286
6284
  return false;
6285
+ Object.defineProperty(objectKeys, pairKey, { value: true });
6287
6286
  }
6288
6287
  return true;
6289
6288
  }
@@ -9188,14 +9187,42 @@ function normalizeSessionId(value) {
9188
9187
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
9189
9188
  return;
9190
9189
  }
9191
- const trimmed = String(value).trim();
9192
- return trimmed || undefined;
9190
+ const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
9191
+ return cleaned || undefined;
9193
9192
  }
9194
9193
  function getConfiguredTelemetrySessionId() {
9195
9194
  return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
9196
9195
  }
9197
- function resolveTelemetrySessionId(existingSessionId) {
9198
- return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
9196
+ function getInheritedSession(env) {
9197
+ for (const candidate of INHERITED_SESSION_SOURCES) {
9198
+ const handle = normalizeSessionId(env[candidate.envVar]);
9199
+ if (handle) {
9200
+ return { id: handle, source: candidate.source };
9201
+ }
9202
+ }
9203
+ return;
9204
+ }
9205
+ function generateRandomSession() {
9206
+ const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
9207
+ crypto.getRandomValues(bytes);
9208
+ let hex = "";
9209
+ for (const byte of bytes) {
9210
+ hex += byte.toString(16).padStart(2, "0");
9211
+ }
9212
+ return { id: hex, source: "random" };
9213
+ }
9214
+ function resolveTelemetrySession() {
9215
+ const existing = telemetrySessionSlot.get();
9216
+ if (existing) {
9217
+ return existing;
9218
+ }
9219
+ const declaredHandle = getConfiguredTelemetrySessionId();
9220
+ const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
9221
+ telemetrySessionSlot.set(resolved);
9222
+ return resolved;
9223
+ }
9224
+ function getTelemetrySessionSource() {
9225
+ return resolveTelemetrySession().source;
9199
9226
  }
9200
9227
  function getTelemetryOperationId() {
9201
9228
  const existing = telemetryOperationIdSlot.get();
@@ -9207,11 +9234,19 @@ function getTelemetryOperationId() {
9207
9234
  telemetryOperationIdSlot.set(generated);
9208
9235
  return generated;
9209
9236
  }
9210
- var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY = "session_id", telemetrySessionIdSlot, telemetryOperationIdSlot;
9237
+ var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID", SESSION_ID_MAX_LENGTH = 64, RANDOM_SESSION_ID_LENGTH = 32, TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source", CONTROL_CHARACTERS, INHERITED_SESSION_SOURCES, telemetrySessionSlot, telemetryOperationIdSlot;
9211
9238
  var init_session_id = __esm(() => {
9212
9239
  init_singleton();
9213
9240
  init_trace_context();
9214
- telemetrySessionIdSlot = singleton("TelemetrySessionId");
9241
+ CONTROL_CHARACTERS = /\p{Cc}/gu;
9242
+ INHERITED_SESSION_SOURCES = [
9243
+ { envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
9244
+ { envVar: "CODEX_THREAD_ID", source: "codex" },
9245
+ { envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
9246
+ { envVar: "TERM_SESSION_ID", source: "terminal" },
9247
+ { envVar: "WT_SESSION", source: "terminal" }
9248
+ ];
9249
+ telemetrySessionSlot = singleton("TelemetrySession");
9215
9250
  telemetryOperationIdSlot = singleton("TelemetryOperationId");
9216
9251
  });
9217
9252
 
@@ -9481,24 +9516,18 @@ class TelemetryService {
9481
9516
  }
9482
9517
  enrichPropertiesWithContext(properties, context) {
9483
9518
  const globalProperties = getGlobalTelemetryProperties();
9484
- const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
9485
- const sessionId = resolveTelemetrySessionId(existingSessionId);
9486
9519
  const enriched = {
9487
9520
  ...getExecutionContextTelemetryProperties(),
9488
9521
  ...globalProperties,
9489
9522
  ...this.defaultProperties,
9490
9523
  ...redactProperties(properties ?? {}),
9524
+ [TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
9491
9525
  ...context ? {
9492
9526
  [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
9493
9527
  ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
9494
9528
  [TELEMETRY_SPAN_ID_PROPERTY]: context.id
9495
9529
  } : {}
9496
9530
  };
9497
- if (sessionId === undefined) {
9498
- delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
9499
- } else {
9500
- enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
9501
- }
9502
9531
  return enriched;
9503
9532
  }
9504
9533
  generateId() {
@@ -62281,7 +62310,12 @@ var require_fast_uri = __commonJS((exports, module) => {
62281
62310
  }
62282
62311
  function resolve4(baseURI, relativeURI, options) {
62283
62312
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
62284
- const resolved = resolveComponent(parse9(baseURI, schemelessOptions), parse9(relativeURI, schemelessOptions), schemelessOptions, true);
62313
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
62314
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
62315
+ if (baseMalformed || relativeMalformed) {
62316
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
62317
+ }
62318
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
62285
62319
  schemelessOptions.skipEscape = true;
62286
62320
  return serialize(resolved, schemelessOptions);
62287
62321
  }
@@ -62408,6 +62442,7 @@ var require_fast_uri = __commonJS((exports, module) => {
62408
62442
  }
62409
62443
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
62410
62444
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
62445
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
62411
62446
  function getParseError(parsed, matches) {
62412
62447
  if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
62413
62448
  return 'URI path must start with "/" when authority is present.';
@@ -62442,6 +62477,20 @@ var require_fast_uri = __commonJS((exports, module) => {
62442
62477
  parsed.error = "URI authority must not contain a literal backslash.";
62443
62478
  malformedAuthorityOrPort = true;
62444
62479
  }
62480
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
62481
+ if (introducerMatch !== null) {
62482
+ const region = introducerMatch[1];
62483
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
62484
+ if (normalizedRegion.length >= 2) {
62485
+ if (normalizedRegion.slice(0, 2) !== "//") {
62486
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
62487
+ malformedAuthorityOrPort = true;
62488
+ } else if (region.length !== normalizedRegion.length) {
62489
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
62490
+ malformedAuthorityOrPort = true;
62491
+ }
62492
+ }
62493
+ }
62445
62494
  const matches = uri.match(URI_PARSE);
62446
62495
  if (matches) {
62447
62496
  parsed.scheme = matches[1];
@@ -65965,7 +66014,7 @@ var init_package = __esm(() => {
65965
66014
  package_default6 = {
65966
66015
  name: "@uipath/integrationservice-sdk",
65967
66016
  license: "MIT",
65968
- version: "1.199.0-preview.99",
66017
+ version: "1.199.0",
65969
66018
  repository: {
65970
66019
  type: "git",
65971
66020
  url: "https://github.com/UiPath/cli.git",
@@ -90267,7 +90316,7 @@ import"./packager-tool.js";
90267
90316
  var package_default = {
90268
90317
  name: "@uipath/agent-tool",
90269
90318
  license: "MIT",
90270
- version: "1.199.0-preview.99",
90319
+ version: "1.199.0",
90271
90320
  description: "cli plugin for creating and managing UiPath low-code agents",
90272
90321
  private: false,
90273
90322
  repository: {
@@ -95288,7 +95337,7 @@ class TextApiResponse2 {
95288
95337
  var package_default3 = {
95289
95338
  name: "@uipath/solution-sdk",
95290
95339
  license: "MIT",
95291
- version: "1.199.0-preview.99",
95340
+ version: "1.199.0",
95292
95341
  repository: {
95293
95342
  type: "git",
95294
95343
  url: "https://github.com/UiPath/cli.git",
@@ -98958,7 +99007,7 @@ class VoidApiResponse3 {
98958
99007
  var package_default4 = {
98959
99008
  name: "@uipath/agent-sdk",
98960
99009
  license: "MIT",
98961
- version: "1.199.0-preview.99",
99010
+ version: "1.199.0",
98962
99011
  description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
98963
99012
  repository: {
98964
99013
  type: "git",
@@ -148315,7 +148364,7 @@ function requireOmap2() {
148315
148364
  function resolveYamlOmap(data) {
148316
148365
  if (data === null)
148317
148366
  return true;
148318
- const objectKeys = [];
148367
+ const objectKeys = {};
148319
148368
  const object = data;
148320
148369
  for (let index = 0, length = object.length;index < length; index += 1) {
148321
148370
  const pair = object[index];
@@ -148333,10 +148382,9 @@ function requireOmap2() {
148333
148382
  }
148334
148383
  if (!pairHasKey)
148335
148384
  return false;
148336
- if (objectKeys.indexOf(pairKey) === -1)
148337
- objectKeys.push(pairKey);
148338
- else
148385
+ if (_hasOwnProperty.call(objectKeys, pairKey))
148339
148386
  return false;
148387
+ Object.defineProperty(objectKeys, pairKey, { value: true });
148340
148388
  }
148341
148389
  return true;
148342
148390
  }
@@ -151177,8 +151225,18 @@ function getInboundTraceContext2() {
151177
151225
  return parseInboundTraceparent2(getProcessEnv3()?.[TELEMETRY_TRACEPARENT_ENV2]);
151178
151226
  }
151179
151227
  var TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID";
151180
- var TELEMETRY_SESSION_ID_PROPERTY2 = "session_id";
151181
- var telemetrySessionIdSlot2 = singleton3("TelemetrySessionId");
151228
+ var SESSION_ID_MAX_LENGTH2 = 64;
151229
+ var RANDOM_SESSION_ID_LENGTH2 = 32;
151230
+ var TELEMETRY_SESSION_SOURCE_PROPERTY2 = "session_id_source";
151231
+ var CONTROL_CHARACTERS2 = /\p{Cc}/gu;
151232
+ var INHERITED_SESSION_SOURCES2 = [
151233
+ { envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
151234
+ { envVar: "CODEX_THREAD_ID", source: "codex" },
151235
+ { envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
151236
+ { envVar: "TERM_SESSION_ID", source: "terminal" },
151237
+ { envVar: "WT_SESSION", source: "terminal" }
151238
+ ];
151239
+ var telemetrySessionSlot2 = singleton3("TelemetrySession");
151182
151240
  var telemetryOperationIdSlot2 = singleton3("TelemetryOperationId");
151183
151241
  function getProcessEnv22() {
151184
151242
  return globalThis.process?.env;
@@ -151187,14 +151245,42 @@ function normalizeSessionId2(value) {
151187
151245
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
151188
151246
  return;
151189
151247
  }
151190
- const trimmed = String(value).trim();
151191
- return trimmed || undefined;
151248
+ const cleaned = String(value).replace(CONTROL_CHARACTERS2, "").trim().slice(0, SESSION_ID_MAX_LENGTH2);
151249
+ return cleaned || undefined;
151192
151250
  }
151193
151251
  function getConfiguredTelemetrySessionId2() {
151194
151252
  return normalizeSessionId2(getProcessEnv22()?.[TELEMETRY_SESSION_ID_ENV2]);
151195
151253
  }
151196
- function resolveTelemetrySessionId2(existingSessionId) {
151197
- return getConfiguredTelemetrySessionId2() ?? normalizeSessionId2(existingSessionId);
151254
+ function getInheritedSession2(env) {
151255
+ for (const candidate of INHERITED_SESSION_SOURCES2) {
151256
+ const handle = normalizeSessionId2(env[candidate.envVar]);
151257
+ if (handle) {
151258
+ return { id: handle, source: candidate.source };
151259
+ }
151260
+ }
151261
+ return;
151262
+ }
151263
+ function generateRandomSession2() {
151264
+ const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH2 / 2);
151265
+ crypto.getRandomValues(bytes);
151266
+ let hex = "";
151267
+ for (const byte of bytes) {
151268
+ hex += byte.toString(16).padStart(2, "0");
151269
+ }
151270
+ return { id: hex, source: "random" };
151271
+ }
151272
+ function resolveTelemetrySession2() {
151273
+ const existing = telemetrySessionSlot2.get();
151274
+ if (existing) {
151275
+ return existing;
151276
+ }
151277
+ const declaredHandle = getConfiguredTelemetrySessionId2();
151278
+ const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession2(getProcessEnv22() ?? {}) ?? generateRandomSession2();
151279
+ telemetrySessionSlot2.set(resolved);
151280
+ return resolved;
151281
+ }
151282
+ function getTelemetrySessionSource2() {
151283
+ return resolveTelemetrySession2().source;
151198
151284
  }
151199
151285
  function getTelemetryOperationId2() {
151200
151286
  const existing = telemetryOperationIdSlot2.get();
@@ -151466,24 +151552,18 @@ class TelemetryService2 {
151466
151552
  }
151467
151553
  enrichPropertiesWithContext(properties, context) {
151468
151554
  const globalProperties = getGlobalTelemetryProperties2();
151469
- const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY2] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY2] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY2];
151470
- const sessionId = resolveTelemetrySessionId2(existingSessionId);
151471
151555
  const enriched = {
151472
151556
  ...getExecutionContextTelemetryProperties2(),
151473
151557
  ...globalProperties,
151474
151558
  ...this.defaultProperties,
151475
151559
  ...redactProperties2(properties ?? {}),
151560
+ [TELEMETRY_SESSION_SOURCE_PROPERTY2]: getTelemetrySessionSource2(),
151476
151561
  ...context ? {
151477
151562
  [TELEMETRY_OPERATION_ID_PROPERTY2]: context.operationId,
151478
151563
  ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY2]: context.parentId } : {},
151479
151564
  [TELEMETRY_SPAN_ID_PROPERTY2]: context.id
151480
151565
  } : {}
151481
151566
  };
151482
- if (sessionId === undefined) {
151483
- delete enriched[TELEMETRY_SESSION_ID_PROPERTY2];
151484
- } else {
151485
- enriched[TELEMETRY_SESSION_ID_PROPERTY2] = sessionId;
151486
- }
151487
151567
  return enriched;
151488
151568
  }
151489
151569
  generateId() {
@@ -152664,7 +152744,7 @@ function querystringSingleKey5(key, value, keyPrefix = "") {
152664
152744
  var package_default5 = {
152665
152745
  name: "@uipath/solution-sdk",
152666
152746
  license: "MIT",
152667
- version: "1.199.0-preview.99",
152747
+ version: "1.199.0",
152668
152748
  repository: {
152669
152749
  type: "git",
152670
152750
  url: "https://github.com/UiPath/cli.git",
@@ -197916,4 +197996,4 @@ export {
197916
197996
  metadata
197917
197997
  };
197918
197998
 
197919
- //# debugId=5F4ED5ECDB01C3EB64756E2164756E21
197999
+ //# debugId=C704D04F7B1AEE2264756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/agent-tool",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.99",
4
+ "version": "1.199.0",
5
5
  "description": "cli plugin for creating and managing UiPath low-code agents",
6
6
  "private": false,
7
7
  "repository": {
@@ -26,5 +26,5 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "gitHead": "6ba217cddceb86e3fa39ed82e49c5062878a85c6"
29
+ "gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
30
30
  }