@uipath/agenthub-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 +49 -20
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -6248,7 +6248,7 @@ function requireOmap() {
6248
6248
  function resolveYamlOmap(data) {
6249
6249
  if (data === null)
6250
6250
  return true;
6251
- const objectKeys = [];
6251
+ const objectKeys = {};
6252
6252
  const object = data;
6253
6253
  for (let index = 0, length = object.length;index < length; index += 1) {
6254
6254
  const pair = object[index];
@@ -6266,10 +6266,9 @@ function requireOmap() {
6266
6266
  }
6267
6267
  if (!pairHasKey)
6268
6268
  return false;
6269
- if (objectKeys.indexOf(pairKey) === -1)
6270
- objectKeys.push(pairKey);
6271
- else
6269
+ if (_hasOwnProperty.call(objectKeys, pairKey))
6272
6270
  return false;
6271
+ Object.defineProperty(objectKeys, pairKey, { value: true });
6273
6272
  }
6274
6273
  return true;
6275
6274
  }
@@ -9174,14 +9173,42 @@ function normalizeSessionId(value) {
9174
9173
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
9175
9174
  return;
9176
9175
  }
9177
- const trimmed = String(value).trim();
9178
- return trimmed || undefined;
9176
+ const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
9177
+ return cleaned || undefined;
9179
9178
  }
9180
9179
  function getConfiguredTelemetrySessionId() {
9181
9180
  return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
9182
9181
  }
9183
- function resolveTelemetrySessionId(existingSessionId) {
9184
- return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
9182
+ function getInheritedSession(env) {
9183
+ for (const candidate of INHERITED_SESSION_SOURCES) {
9184
+ const handle = normalizeSessionId(env[candidate.envVar]);
9185
+ if (handle) {
9186
+ return { id: handle, source: candidate.source };
9187
+ }
9188
+ }
9189
+ return;
9190
+ }
9191
+ function generateRandomSession() {
9192
+ const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
9193
+ crypto.getRandomValues(bytes);
9194
+ let hex = "";
9195
+ for (const byte of bytes) {
9196
+ hex += byte.toString(16).padStart(2, "0");
9197
+ }
9198
+ return { id: hex, source: "random" };
9199
+ }
9200
+ function resolveTelemetrySession() {
9201
+ const existing = telemetrySessionSlot.get();
9202
+ if (existing) {
9203
+ return existing;
9204
+ }
9205
+ const declaredHandle = getConfiguredTelemetrySessionId();
9206
+ const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
9207
+ telemetrySessionSlot.set(resolved);
9208
+ return resolved;
9209
+ }
9210
+ function getTelemetrySessionSource() {
9211
+ return resolveTelemetrySession().source;
9185
9212
  }
9186
9213
  function getTelemetryOperationId() {
9187
9214
  const existing = telemetryOperationIdSlot.get();
@@ -9193,11 +9220,19 @@ function getTelemetryOperationId() {
9193
9220
  telemetryOperationIdSlot.set(generated);
9194
9221
  return generated;
9195
9222
  }
9196
- var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY = "session_id", telemetrySessionIdSlot, telemetryOperationIdSlot;
9223
+ 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;
9197
9224
  var init_session_id = __esm(() => {
9198
9225
  init_singleton();
9199
9226
  init_trace_context();
9200
- telemetrySessionIdSlot = singleton2("TelemetrySessionId");
9227
+ CONTROL_CHARACTERS = /\p{Cc}/gu;
9228
+ INHERITED_SESSION_SOURCES = [
9229
+ { envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
9230
+ { envVar: "CODEX_THREAD_ID", source: "codex" },
9231
+ { envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
9232
+ { envVar: "TERM_SESSION_ID", source: "terminal" },
9233
+ { envVar: "WT_SESSION", source: "terminal" }
9234
+ ];
9235
+ telemetrySessionSlot = singleton2("TelemetrySession");
9201
9236
  telemetryOperationIdSlot = singleton2("TelemetryOperationId");
9202
9237
  });
9203
9238
 
@@ -9467,24 +9502,18 @@ class TelemetryService {
9467
9502
  }
9468
9503
  enrichPropertiesWithContext(properties, context) {
9469
9504
  const globalProperties = getGlobalTelemetryProperties();
9470
- const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
9471
- const sessionId = resolveTelemetrySessionId(existingSessionId);
9472
9505
  const enriched = {
9473
9506
  ...getExecutionContextTelemetryProperties(),
9474
9507
  ...globalProperties,
9475
9508
  ...this.defaultProperties,
9476
9509
  ...redactProperties(properties ?? {}),
9510
+ [TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
9477
9511
  ...context ? {
9478
9512
  [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
9479
9513
  ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
9480
9514
  [TELEMETRY_SPAN_ID_PROPERTY]: context.id
9481
9515
  } : {}
9482
9516
  };
9483
- if (sessionId === undefined) {
9484
- delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
9485
- } else {
9486
- enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
9487
- }
9488
9517
  return enriched;
9489
9518
  }
9490
9519
  generateId() {
@@ -67647,7 +67676,7 @@ init_esm();
67647
67676
  var package_default = {
67648
67677
  name: "@uipath/agenthub-tool",
67649
67678
  license: "MIT",
67650
- version: "1.199.0-preview.99",
67679
+ version: "1.199.0",
67651
67680
  description: "Manage UiPath AgentHub MCP server registrations, tools, and remote A2A agents.",
67652
67681
  private: false,
67653
67682
  repository: {
@@ -90886,7 +90915,7 @@ class TextApiResponse2 {
90886
90915
  var package_default4 = {
90887
90916
  name: "@uipath/integrationservice-sdk",
90888
90917
  license: "MIT",
90889
- version: "1.199.0-preview.99",
90918
+ version: "1.199.0",
90890
90919
  repository: {
90891
90920
  type: "git",
90892
90921
  url: "https://github.com/UiPath/cli.git",
@@ -99691,4 +99720,4 @@ export {
99691
99720
  createStandaloneProgram
99692
99721
  };
99693
99722
 
99694
- //# debugId=77430421703E502C64756E2164756E21
99723
+ //# debugId=FFCBF4B5E2C9301F64756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/agenthub-tool",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.99",
4
+ "version": "1.199.0",
5
5
  "description": "Manage UiPath AgentHub MCP server registrations, tools, and remote A2A 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
  }